NODEVFS cleanup: unifdef
This commit is contained in:
parent
5777c5b989
commit
6ec82c07ac
@ -178,13 +178,6 @@ tapmodevent(mod, type, data)
|
||||
goto bail2;
|
||||
}
|
||||
|
||||
#ifdef NODEVFS
|
||||
error = cdevsw_add(&tap_cdevsw);
|
||||
if (error != 0) {
|
||||
EVENTHANDLER_DEREGISTER(dev_clone, eh_tag);
|
||||
goto bail2;
|
||||
}
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
bail2:
|
||||
@ -229,9 +222,6 @@ tapmodevent(mod, type, data)
|
||||
if (tapbasedev != NOUDEV)
|
||||
destroy_dev(udev2dev(tapbasedev, 0));
|
||||
|
||||
#ifdef NODEVFS
|
||||
cdevsw_remove(&tap_cdevsw);
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
||||
|
@ -147,13 +147,6 @@ tunmodevent(module_t mod, int type, void *data)
|
||||
tag = EVENTHANDLER_REGISTER(dev_clone, tunclone, 0, 1000);
|
||||
if (tag == NULL)
|
||||
return (ENOMEM);
|
||||
#ifdef NODEVFS
|
||||
err = cdevsw_add(&tun_cdevsw);
|
||||
if (err != 0) {
|
||||
EVENTHANDLER_DEREGISTER(dev_clone, tag);
|
||||
return (err);
|
||||
}
|
||||
#endif
|
||||
tununits.rm_type = RMAN_ARRAY;
|
||||
tununits.rm_descr = "open if_tun units";
|
||||
err = rman_init(&tununits);
|
||||
@ -200,9 +193,6 @@ tunmodevent(module_t mod, int type, void *data)
|
||||
if (tunbasedev != NOUDEV)
|
||||
destroy_dev(udev2dev(tunbasedev, 0));
|
||||
|
||||
#ifdef NODEVFS
|
||||
cdevsw_remove(&tun_cdevsw);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user