From 4212d51a7da942b0c717c9965552c9549d90de08 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 26 Sep 2008 14:19:52 +0000 Subject: Remove unit2minor() use from kernel code. When I changed kern_conf.c three months ago I made device unit numbers equal to (unneeded) device minor numbers. We used to require bitshifting, because there were eight bits in the middle that were reserved for a device major number. Not very long after I turned dev2unit(), minor(), unit2minor() and minor2unit() into macro's. The unit2minor() and minor2unit() macro's were no-ops. We'd better not remove these four macro's from the kernel, because there is a lot of (external) code that may still depend on them. For now it's harmless to remove all invocations of unit2minor() and minor2unit(). Reviewed by: kib --- sys/net/if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/net/if.c') diff --git a/sys/net/if.c b/sys/net/if.c index 11df979..0bc0329 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -514,7 +514,7 @@ if_attach(struct ifnet *ifp) #endif ifdev_setbyindex(ifp->if_index, make_dev(&net_cdevsw, - unit2minor(ifp->if_index), UID_ROOT, GID_WHEEL, 0600, "%s/%s", + ifp->if_index, UID_ROOT, GID_WHEEL, 0600, "%s/%s", net_cdevsw.d_name, ifp->if_xname)); make_dev_alias(ifdev_byindex(ifp->if_index), "%s%d", net_cdevsw.d_name, ifp->if_index); -- cgit v1.1