diff options
author | phk <phk@FreeBSD.org> | 2003-01-19 11:03:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-01-19 11:03:07 +0000 |
commit | 24596ddb76743273c5d39821727e4e00d025cb02 (patch) | |
tree | a1836e6e7bd999b9e7099048c5c2bd9535ef95cd /sys/net/if_tap.c | |
parent | 49b60b2ebe504ba8584d684a66b1351307a962cf (diff) | |
download | FreeBSD-src-24596ddb76743273c5d39821727e4e00d025cb02.zip FreeBSD-src-24596ddb76743273c5d39821727e4e00d025cb02.tar.gz |
Originally when DEVFS was added, a global variable "devfs_present"
was used to control code which were conditional on DEVFS' precense
since this avoided the need for large-scale source pollution with
#include "opt_geom.h"
Now that we approach making DEVFS standard, replace these tests
with an #ifdef to facilitate mechanical removal once DEVFS becomes
non-optional.
No functional change by this commit.
Diffstat (limited to 'sys/net/if_tap.c')
-rw-r--r-- | sys/net/if_tap.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index d84d2b4..0648200 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -178,13 +178,13 @@ tapmodevent(mod, type, data) goto bail2; } - if (!devfs_present) { - error = cdevsw_add(&tap_cdevsw); - if (error != 0) { - EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); - 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,8 +229,9 @@ bail: if (tapbasedev != NOUDEV) destroy_dev(udev2dev(tapbasedev, 0)); - if (!devfs_present) - cdevsw_remove(&tap_cdevsw); +#ifdef NODEVFS + cdevsw_remove(&tap_cdevsw); +#endif break; |