Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Aug 2001 20:43:29 -0700 (PDT)
From:      Joseph Mallett <jmallett@xMach.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/29971: variables are named inconsistently in MAKEDEV
Message-ID:  <200108230343.f7N3hTZ24329@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         29971
>Category:       misc
>Synopsis:       variables are named inconsistently in MAKEDEV
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 22 20:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Joseph Mallett
>Release:        RELENG_4
>Organization:
xMach
>Environment:
NA
>Description:
There seems to be a convention in MAKEDEV to use 'units' as the number of units of a particular device major to create (and it is used to generate sequential minors and device names, etc.). However, a few locations stray from this and use names like 'nbpf' or 'ntun'.
>How-To-Repeat:
grep ntap MAKEDEV
>Fix:

--- makedev.orig	Mon Aug 20 11:39:53 2001
+++ MAKEDEV	Mon Aug 20 11:49:49 2001
@@ -1079,9 +1079,9 @@
 	;;
 
 bpf*)
-	nbpf=`expr $i : 'bpf\(.*\)$'`
+	units=`expr $i : 'bpf\(.*\)$'`
 	unit=0
-	while [ $unit -le $nbpf ]; do
+	while [ $unit -le $units ]; do
 		mknod bpf$unit c 23 `unit2minor $unit`
 		unit=$(($unit + 1))
 	done
@@ -1164,9 +1164,9 @@
 #       the manual that comes with the system.
 ttyA*)
 	major=68
-	nports=`expr $i : 'ttyA\(.*\)$'`
+	units=`expr $i : 'ttyA\(.*\)$'`
 	port=1
-	while [ $port -le $nports ]; do
+	while [ $port -le $units ]; do
 		minor=$(expr $port - 1)
 		name=$(printf %02d $port)
 		mknod ttyA$name c $major $minor
@@ -1181,9 +1181,9 @@
 cuaA*)
 	umask 7
 	major=68
-	nports=`expr $i : 'cuaA\(.*\)$'`
+	units=`expr $i : 'cuaA\(.*\)$'`
 	port=1
-	while [ $port -le $nports ]; do
+	while [ $port -le $units ]; do
 		minor=$(expr $port - 1)
 		name=$(printf %02d $port)
 		mknod cuaA$name c $major `expr $minor + 128` uucp:dialer
@@ -1541,18 +1541,18 @@
 	;;
 
 tun*)
-	ntun=`expr $i : 'tun\(.*\)$'`
+	units=`expr $i : 'tun\(.*\)$'`
 	unit=0
-	while [ $unit -le $ntun ]; do
+	while [ $unit -le $units ]; do
 		mknod tun$unit c 52 `unit2minor $unit`
 		unit=$(($unit + 1))
 	done
 	;;
 
 tap*)
-	ntap=`expr $i : 'tap\(.*\)$'`
+	units=`expr $i : 'tap\(.*\)$'`
 	unit=0
-	while [ $unit -le $ntap ]; do
+	while [ $unit -le $units ]; do
 		mknod tap$unit c 149 `unit2minor $unit` root:network
 		unit=$(($unit + 1))
 	done

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108230343.f7N3hTZ24329>