3606 {
3607 mutex_enter(prtdata.mutex);
3608 prtdata.ifname = MODULENAME;
3609 prtdata.fmt = "^%s: %s\n";
3610 prtdata.level = CE_CONT;
3611
3612 return (vr_prt);
3613 }
3614 #endif /* DEBUG */
3615
3616 DDI_DEFINE_STREAM_OPS(vr_dev_ops, nulldev, nulldev, vr_attach, vr_detach,
3617 nodev, NULL, D_MP, NULL, vr_quiesce);
3618
3619 static struct modldrv vr_modldrv = {
3620 &mod_driverops, /* Type of module. This one is a driver */
3621 vr_ident, /* short description */
3622 &vr_dev_ops /* driver specific ops */
3623 };
3624
3625 static struct modlinkage modlinkage = {
3626 MODREV_1, (void *)&vr_modldrv, NULL
3627 };
3628
3629 int
3630 _info(struct modinfo *modinfop)
3631 {
3632 return (mod_info(&modlinkage, modinfop));
3633 }
3634
3635 int
3636 _init(void)
3637 {
3638 int status;
3639
3640 mac_init_ops(&vr_dev_ops, MODULENAME);
3641 status = mod_install(&modlinkage);
3642 if (status == DDI_SUCCESS)
3643 mutex_init(prtdata.mutex, NULL, MUTEX_DRIVER, NULL);
3644 else
3645 mac_fini_ops(&vr_dev_ops);
3646 return (status);
|
3606 {
3607 mutex_enter(prtdata.mutex);
3608 prtdata.ifname = MODULENAME;
3609 prtdata.fmt = "^%s: %s\n";
3610 prtdata.level = CE_CONT;
3611
3612 return (vr_prt);
3613 }
3614 #endif /* DEBUG */
3615
3616 DDI_DEFINE_STREAM_OPS(vr_dev_ops, nulldev, nulldev, vr_attach, vr_detach,
3617 nodev, NULL, D_MP, NULL, vr_quiesce);
3618
3619 static struct modldrv vr_modldrv = {
3620 &mod_driverops, /* Type of module. This one is a driver */
3621 vr_ident, /* short description */
3622 &vr_dev_ops /* driver specific ops */
3623 };
3624
3625 static struct modlinkage modlinkage = {
3626 MODREV_1, { (void *)&vr_modldrv, NULL }
3627 };
3628
3629 int
3630 _info(struct modinfo *modinfop)
3631 {
3632 return (mod_info(&modlinkage, modinfop));
3633 }
3634
3635 int
3636 _init(void)
3637 {
3638 int status;
3639
3640 mac_init_ops(&vr_dev_ops, MODULENAME);
3641 status = mod_install(&modlinkage);
3642 if (status == DDI_SUCCESS)
3643 mutex_init(prtdata.mutex, NULL, MUTEX_DRIVER, NULL);
3644 else
3645 mac_fini_ops(&vr_dev_ops);
3646 return (status);
|