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/netgraph/ng_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netgraph') diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index d8ba676..5db9218 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -179,7 +179,7 @@ ng_device_constructor(node_p node) NG_NODE_SET_PRIVATE(node, priv); priv->node = node; - priv->ngddev = make_dev(&ngd_cdevsw, unit2minor(priv->unit), UID_ROOT, + priv->ngddev = make_dev(&ngd_cdevsw, priv->unit, UID_ROOT, GID_WHEEL, 0600, NG_DEVICE_DEVNAME "%d", priv->unit); if(priv->ngddev == NULL) { printf("%s(): make_dev() failed\n",__func__); -- cgit v1.1