1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-11 14:10:34 +00:00

Be more careful about NOUDEV and NODEV.

Submitted by:	bde
This commit is contained in:
Poul-Henning Kamp 2000-01-04 12:51:50 +00:00
parent 6a77f60d4a
commit fb01c24c11
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55414

View File

@ -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));