diff options
author | phk <phk@FreeBSD.org> | 2000-01-04 12:51:50 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-01-04 12:51:50 +0000 |
commit | be15f1db174da6fa6fb1f33cb29fb65db9b9e5aa (patch) | |
tree | 959cfb852a926561805d2b87dea702e1d5c49ba0 | |
parent | 325c58929addcc4459a0dbcf440b7619b0234364 (diff) | |
download | FreeBSD-src-be15f1db174da6fa6fb1f33cb29fb65db9b9e5aa.zip FreeBSD-src-be15f1db174da6fa6fb1f33cb29fb65db9b9e5aa.tar.gz |
Be more careful about NOUDEV and NODEV.
Submitted by: bde
-rw-r--r-- | sys/kern/kern_conf.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index ad62d2a..d6116f7 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -189,6 +189,9 @@ lminor(dev_t x) dev_t makebdev(int x, int y) { + + if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) + Debugger("makebdev of NOUDEV"); return (makedev(bmaj2cmaj[x], y)); } @@ -200,6 +203,8 @@ makedev(int x, int y) int hash; static int stashed; + if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) + Debugger("makedev of NOUDEV"); udev = (x << 8) | y; hash = udev % DEVT_HASH; LIST_FOREACH(si, &dev_hash[hash], si_hash) { @@ -254,6 +259,9 @@ dev2udev(dev_t x) dev_t udev2dev(udev_t x, int b) { + + if (x == NOUDEV) + return (NODEV); switch (b) { case 0: return makedev(umajor(x), uminor(x)); |