Browse Source

use Add() consistently and make sure we use decimal numbers for addition

in the case of ugen devices.
suggestions and ok todd@
OPENBSD_3_7
danh 20 years ago
parent
commit
8a8b24480f
2 changed files with 7 additions and 7 deletions
  1. +4
    -4
      src/etc/MAKEDEV.common
  2. +3
    -3
      src/etc/etc.mvmeppc/MAKEDEV.md

+ 4
- 4
src/etc/MAKEDEV.common View File

@ -1,4 +1,4 @@
vers(a, {-$OpenBSD: MAKEDEV.common,v 1.14 2005/01/14 22:39:11 miod Exp $-})dnl
vers(a, {-$OpenBSD: MAKEDEV.common,v 1.15 2005/01/28 18:56:27 danh Exp $-})dnl
divert(1)dnl divert(1)dnl
dnl dnl
dnl Common device definitions. dnl Common device definitions.
@ -328,7 +328,7 @@ _mkdev({-wsdisp-}, tty[C-F]*, {-U=${i##tty[C-F]}
ttyF*) n=F m=expr(3*256);; ttyF*) n=F m=expr(3*256);;
esac esac
case $U in case $U in
[0-9a-f]) M tty$n$U c major_wsdisp_c {-$(( 16#$U + $m ))-} 600;;
[0-9a-f]) M tty$n$U c major_wsdisp_c Add(16#$U, $m) 600;;
cfg) M tty${n}cfg c major_wsdisp_c Add(255,$m) 600;; cfg) M tty${n}cfg c major_wsdisp_c Add(255,$m) 600;;
*) echo bad unit $U for $i; exit 1;; *) echo bad unit $U for $i; exit 1;;
esac-})dnl esac-})dnl
@ -395,9 +395,9 @@ __devitem(uscan, uscanner*, Scanners,uscanner)dnl
_mcdev({-uscan-}, uscanner*, {-uscanner-}, {-major_uscan_c-}, 660)dnl _mcdev({-uscan-}, uscanner*, {-uscanner-}, {-major_uscan_c-}, 660)dnl
__devitem(ugen, ugen*, Generic USB devices)dnl __devitem(ugen, ugen*, Generic USB devices)dnl
_mkdev(ugen, ugen*, {-n=Mult($U, 16) _mkdev(ugen, ugen*, {-n=Mult($U, 16)
for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5}
do do
M ugen$U.$j c major_ugen_c Add($n, $j) 660
M ugen$U.$j c major_ugen_c Add($n, 10#$j) 660
done-})dnl done-})dnl
__devtitle(call, Call units)dnl __devtitle(call, Call units)dnl
__devtitle(term, Terminal ports)dnl __devtitle(term, Terminal ports)dnl


+ 3
- 3
src/etc/etc.mvmeppc/MAKEDEV.md View File

@ -1,5 +1,5 @@
vers(__file__, vers(__file__,
{-$OpenBSD: MAKEDEV.md,v 1.16 2004/04/11 18:05:23 millert Exp $-},
{-$OpenBSD: MAKEDEV.md,v 1.17 2005/01/28 18:56:27 danh Exp $-},
etc.MACHINE)dnl etc.MACHINE)dnl
dnl dnl
dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
@ -317,10 +317,10 @@ uhid*)
;; ;;
ugen*) ugen*)
for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5}
do do
rm -f ugen$unit.$j rm -f ugen$unit.$j
mknod ugen$unit.$j c 63 $(( $unit * 16 + $j ))
mknod ugen$unit.$j c 63 $(( $unit * 16 + 10#$j ))
chown root:wheel ugen$unit.$j chown root:wheel ugen$unit.$j
chmod 660 ugen$unit.$j chmod 660 ugen$unit.$j
done done


Loading…
Cancel
Save