Subject: misc/27235: MAKEDEV regression because of printf -> zeropad change [patch]
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <j+nbsd@2004.salmi.ch>
List: netbsd-bugs
Date: 10/12/2004 16:20:53
>Number: 27235
>Category: misc
>Synopsis: MAKEDEV regression because of printf -> zeropad change [patch]
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 12 14:21:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Jukka Salmi
>Release: NetBSD 2.99.9
>Organization:
>Environment:
System: NetBSD himo.salmi.ch 2.99.9 NetBSD 2.99.9 (GENERIC) #0: Mon Oct 11 12:04:53 CEST 2004 build@himo.salmi.ch:/build/nbsd/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
The change made to src/etc/MAKEDEV.tmpl four months ago (and pulled up to
2.0 six weeks ago) broke MAKEDEV (see "How-To-Repeat" for details, "Fix" for
a patch).
>How-To-Repeat:
$ cd /dev
$ TOOL_MKNOD='echo mknod' ./MAKEDEV tty04
./MAKEDEV: bad padding
mknod -F netbsd -r -m 600 -g #0 -u #66 tty c 8 4
mknod -F netbsd -r -m 600 -g #0 -u #66 dty c 8 524292
(note the 'bad padding' error message, and the device names...)
>Fix:
--- src/etc/MAKEDEV.tmpl.orig 2004-10-04 19:03:56.000000000 +0200
+++ src/etc/MAKEDEV.tmpl 2004-10-12 15:58:33.000000000 +0200
@@ -297,6 +297,7 @@
3) echo 000$2;;
2) echo 00$2;;
1) echo 0$2;;
+ 0) echo $2;;
*) echo "$0: bad padding" 1>&2; exit 1;;
esac
}
>Release-Note:
>Audit-Trail:
>Unformatted: