Use zeropad() and hexprint() instead of printf(1).

This commit is contained in:
lukem 2005-05-02 00:47:58 +00:00
parent 117d01fe78
commit 710a7ff6e8
1 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.7 2004/01/27 15:45:19 lukem Exp $
# $NetBSD: MAKEDEV.conf,v 1.8 2005/05/02 00:47:58 lukem Exp $
all_md)
makedev mt0 mt1 ts0 ts1 st0 st1 uk0 ss0 cd0 vt0
@ -94,8 +94,8 @@ dz*)
i=0
while [ $i -lt 8 ]
do
no=$(($unit * 8 + $i))
mkdev tty$(printf %02d $no) c 1 $no
ounit=$(zeropad 2 $unit)
mkdev tty$ounit c 1 $(($unit * 8 + $i))
i=$(($i + 1))
done
;;
@ -171,7 +171,7 @@ dhu*|dh*|dmf*|dmz*|vt*)
i=0
while [ $i -lt $count ]
do
mkdev tty$ch$(printf "%x" $i) c $major $(($unit * $count + $i))
mkdev tty$ch$(hexprint $i) c $major $(($unit * $count + $i))
i=$(($i + 1))
done
@ -179,7 +179,7 @@ dhu*|dh*|dmf*|dmz*|vt*)
dl*)
unit=${i#dl}
mkdev ttyJ$(printf "%x" $unit) c 66 $unit
mkdev ttyJ$(hexprint $unit) c 66 $unit
;;
lp*|va*|vp*)
@ -211,8 +211,8 @@ np*)
i=0
while [ $i -lt 4 ]
do
oi=$(($offset + $i))
mkdev np$(printf "%02d" $oi) c 39 $oi
ounit=$(zeropad 2 $i)
mkdev np$ounit c 39 $(($offset + $i))
i=$(($i + 1))
done
esac