Subject: misc/3415: MAKEDEV bpf > 9
To: None <>
From: Kimmo Suominen <>
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
>Originator:     Kimmo Suominen
Kimmo Suominen
>Release:        recent
System: NetBSD 1.2C NetBSD 1.2C (BEOWULF) #0: Tue Mar 11 20:40:56 EST 1997 i386
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.
cd /dev
./MAKEDEV bpfa
--- /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;;
+	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