summaryrefslogtreecommitdiffstats
path: root/sys/cddl
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/cddl
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/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index 86838df..5687522 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -494,7 +494,7 @@ zfs_init_fs(zfsvfs_t *zfsvfs, znode_t **zpp)
static uint64_t
zfs_expldev(dev_t dev)
{
- return (((uint64_t)umajor(dev) << NBITSMINOR64) | uminor(dev));
+ return (((uint64_t)major(dev) << NBITSMINOR64) | minor(dev));
}
/*
* Special cmpldev for ZFS private use.
OpenPOWER on IntegriCloud