aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_conf.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2008-06-12 08:30:54 +0000
committerEd Schouten <ed@FreeBSD.org>2008-06-12 08:30:54 +0000
commit0f03ce1bb8df1297441f59300c534a01aa119ad0 (patch)
treef8f066a50f4fd515a22bc25b1b4119448ab6f55b /sys/kern/kern_conf.c
parent9a764aac3f0d7e5804af1d65bc64c9b7e54495c6 (diff)
downloadsrc-0f03ce1bb8df1297441f59300c534a01aa119ad0.tar.gz
src-0f03ce1bb8df1297441f59300c534a01aa119ad0.zip
Turn dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
Now that we got rid of the minor-to-unit conversion and the constraints on device minor numbers, we can convert the functions that operate on minor and unit numbers to simple macro's. The unit2minor() and minor2unit() macro's are now no-ops. The ZFS code als defined a macro named `minor'. Change the ZFS code to use umajor() and uminor() here, as it is the correct approach to do this. Also add $FreeBSD$ to keep SVN happy. Approved by: philip (mentor), pjd
Notes
Notes: svn path=/head/; revision=179757
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r--sys/kern/kern_conf.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 0cff9eaff722..c9eac628796a 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -492,41 +492,6 @@ giant_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
}
-/*
- * struct cdev * and u_dev_t primitives
- */
-
-int
-minor(struct cdev *x)
-{
- if (x == NULL)
- return NODEV;
- return (x->si_drv0);
-}
-
-int
-dev2unit(struct cdev *x)
-{
-
- if (x == NULL)
- return NODEV;
- return (x->si_drv0);
-}
-
-u_int
-minor2unit(u_int _minor)
-{
-
- return (_minor);
-}
-
-int
-unit2minor(int unit)
-{
-
- return (unit);
-}
-
static void
notify(struct cdev *dev, const char *ev)
{