Subject: misc/3415: MAKEDEV bpf > 9
To: None <gnats-bugs@gnats.netbsd.org>
From: Kimmo Suominen <kim@tac.nyc.ny.us>
List: netbsd-bugs
Date: 03/30/1997 17:16:50
>Number:         3415
>Category:       misc
>Synopsis:       MAKEDEV only makes decimal bpf device names
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 30 14:35:01 1997
>Last-Modified:
>Originator:     Kimmo Suominen
>Organization:
Kimmo Suominen
>Release:        recent
>Environment:
System: NetBSD hrothgar.gw.com 1.2C NetBSD 1.2C (BEOWULF) #0: Tue Mar 11 20:40:56 EST 1997 kim@ramoth.nyc.deshaw.com:/usr/src/sys/arch/i386/compile/BEOWULF i386
>Description:
Creating bpfa (to bbff) confuses MAKEDEV.  They will all get minor set
to zero (like bpf0).  The attached fix will allow one to follow the
conventional naming using hex digits.

This affects the other devices in the same switch of the case statement,
i.e. tun, mms, lms, pms and joy.
>How-To-Repeat:
cd /dev
./MAKEDEV bpfa
>Fix:
--- /dev/MAKEDEV	Mon Nov  4 18:28:36 1996
+++ MAKEDEV	Sun Mar 30 17:05:37 1997
@@ -308,8 +308,9 @@
 	pms*) name=pms;	unit=${i#pms};	chr=37;;
 	joy*) name=joy;	unit=${i#joy};	chr=26;;
 	esac
+	nbr=`printf "%d" 0x$unit`
 	rm -f $name$unit
-	mknod $name$unit	c $chr $unit
+	mknod $name$unit	c $chr $nbr
 	chown root.wheel $name$unit
 	;;
 
>Audit-Trail:
>Unformatted: