summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-01-28 17:57:16 +0000
committered <ed@FreeBSD.org>2009-01-28 17:57:16 +0000
commita964306db9f5f3dcada77a81a5f3af448d146fc4 (patch)
treea4d8791bcffe7b700a58d406674efaab2d6f59ee /sys/fs/cd9660
parent5cbdce783bd4925f5a830d13c274b2c77fe993a3 (diff)
downloadFreeBSD-src-a964306db9f5f3dcada77a81a5f3af448d146fc4.zip
FreeBSD-src-a964306db9f5f3dcada77a81a5f3af448d146fc4.tar.gz
Last step of splitting up minor and unit numbers: remove minor().
Inside the kernel, the minor() function was responsible for obtaining the device minor number of a character device. Because we made device numbers dynamically allocated and independent of the unit number passed to make_dev() a long time ago, it was actually a misnomer. If you really want to obtain the device number, you should use dev2udev(). We already converted all the drivers to use dev2unit() to obtain the device unit number, which is still used by a lot of drivers. I've noticed not a single driver passes NULL to dev2unit(). Even if they would, its behaviour would make little sense. This is why I've removed the NULL check. Ths commit removes minor(), minor2unit() and unit2minor() from the kernel. Because there was a naming collision with uminor(), we can rename umajor() and uminor() back to major() and minor(). This means that the makedev(3) manual page also applies to kernel space code now. I suspect umajor() and uminor() isn't used that often in external code, but to make it easier for other parties to port their code, I've increased __FreeBSD_version to 800062.
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r--sys/fs/cd9660/cd9660_rrip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c
index 739972b..9a32e9b 100644
--- a/sys/fs/cd9660/cd9660_rrip.c
+++ b/sys/fs/cd9660/cd9660_rrip.c
@@ -416,9 +416,9 @@ cd9660_rrip_device(p,ana)
low = isonum_733(p->dev_t_low);
if (high == 0)
- ana->inop->inode.iso_rdev = makedev(umajor(low), uminor(low));
+ ana->inop->inode.iso_rdev = makedev(major(low), minor(low));
else
- ana->inop->inode.iso_rdev = makedev(high, uminor(low));
+ ana->inop->inode.iso_rdev = makedev(high, minor(low));
ana->fields &= ~ISO_SUSP_DEVICE;
return ISO_SUSP_DEVICE;
}
OpenPOWER on IntegriCloud