/** * Stop the kernel module. */ static kern_return_t VBoxNetAdpDarwinStop(struct kmod_info *pKModInfo, void *pvData) { Log(("VBoxNetAdpDarwinStop\n")); vboxNetAdpShutdown(); /* Remove control device */ devfs_remove(g_hCtlDev); cdevsw_remove(g_nCtlDev, &g_ChDev); RTR0Term(); return KMOD_RETURN_SUCCESS; }
/** * Unload the module. * * @todo We have to prevent this if we're busy! */ static void __exit VBoxNetAdpLinuxUnload(void) { Log(("VBoxNetAdpLinuxUnload\n")); /* * Undo the work done during start (in reverse order). */ vboxNetAdpShutdown(); /* Remove control device */ misc_deregister(&g_CtlDev); RTR0Term(); Log(("VBoxNetAdpLinuxUnload - done\n")); }
/** * Unload the module. * * @todo We have to prevent this if we're busy! */ static void __exit VBoxNetAdpLinuxUnload(void) { int rc; Log(("VBoxNetAdpLinuxUnload\n")); /* * Undo the work done during start (in reverse order). */ vboxNetAdpShutdown(); /* Remove control device */ rc = misc_deregister(&g_CtlDev); if (rc < 0) { printk(KERN_ERR "misc_deregister failed with rc=%x\n", rc); } RTR0Term(); Log(("VBoxNetAdpLinuxUnload - done\n")); }