Subject: install/37498: bug in MAKEDEV
To: None <install-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dlagno@rambler.ru>
List: netbsd-bugs
Date: 12/07/2007 23:35:00
>Number: 37498
>Category: install
>Synopsis: bug in MAKEDEV
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: install-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 07 23:35:00 +0000 2007
>Originator: Denis Lagno
>Release: 4.99.40
>Organization:
nVidia
>Environment:
NetBSD flam.gado 4.99.40 NetBSD 4.99.40 (FLAM) #0: Thu Dec 6 22:01:45 MSK 2007 dina@flam.gado:/volatile/worksrc/netbsd-current/obj/sys/arch/i386/compile/FLAM i386
>Description:
Looking at code in /dev/MAKEDEV:
sh "$0.local" $opts -s all | \
while read l; do
count_nodes=$((count_nodes + 1))
done
it is obviously incorrect: variable count_nodes is changed in child process, and not in parent
>How-To-Repeat:
code inspection
>Fix:
in src/etc/MAKEDEV.tmpl replace
sh "$0.local" $opts -s all | \
while read l; do
count_nodes=$((count_nodes + 1))
done
with
count_nodes=$(($count_nodes + $(sh "$0.local" $opts -s all | wc -l)))