From 9c009b8ac80177e63337ad7846f136910981b79b Mon Sep 17 00:00:00 2001 From: todd <> Date: Thu, 14 Feb 2002 14:32:26 +0000 Subject: [PATCH] fix just a tad --- src/etc/MAKEDEV.mi | 101 +++++++++++++++++++++++++++++++++++-- src/etc/etc.vax/MAKEDEV.md | 29 ++++++----- 2 files changed, 115 insertions(+), 15 deletions(-) diff --git a/src/etc/MAKEDEV.mi b/src/etc/MAKEDEV.mi index 9438efc1..1148a350 100644 --- a/src/etc/MAKEDEV.mi +++ b/src/etc/MAKEDEV.mi @@ -1,6 +1,6 @@ include(MAKEDEV.sub)dnl dnl -vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.29 2002/02/14 05:38:22 todd Exp $-})dnl +vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.30 2002/02/14 14:32:26 todd Exp $-})dnl dnl divert(1)dnl {-#-} @@ -451,7 +451,102 @@ target(ramd, tty0, 0, 1)dnl target(ramd, pty, 0)dnl -})dnl ifelse(MACHINE, vax, {- +__devitem(dhu, dhu*, unibus dhu11)dnl +__devitem(dmz, dmz*, unibus dmz32)dnl +__devitem(dmf, dmf*, unibus dmf32)dnl +__devitem(dh, dh*, {-unibus dh11 and emulations (e.g. Able dmax, Emulex cs-11)-}) +__devitem(vt, vt*, {-console-})dnl +__devitem(dz, dz*, unibus dz11 and dz32)dnl +_mkdev(dz, dz*, +{-unit=${i#dz}; + case $unit in + [0-7]) + i=0 + while [ $i -lt 8 ]; do + no=$(($unit * 8 + $i)) + if [ $no -lt 10 ]; then + no="0${no}" + fi + rm -f tty${no} + mknod tty${no} c 1 $no + i=$(($i + 1)) + done + ;; + *) + echo bad unit for dz in: $i + ;; + esac-})dnl +dnl XXX split this up abit? +_mkdev(dhu, dhu*|dmz*|dmf*|dh*, +{-set -A cnvtbl 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v + case $i in + vt*) name=vt; major=68; count=8; + unit=${i#vt} + case $unit in + 0) ch=w ;; + *) echo bad unit for $name in: $i ;; + esac;; + dmz*) name=dmz; major=37; count=24; + unit=${i#dmz} + case $unit in + 0) ch=a ;; 1) ch=b ;; 2) ch=c ;; 3) ch=e ;; 4) ch=f ;; + *) echo bad unit for $name in: $i ;; + esac;; + dmf*) name=dmf; major=22; count=8; + unit=${i#dmf} + case $unit in + 0) ch=A ;; 1) ch=B ;; 2) ch=C ;; 3) ch=E ;; + 4) ch=F ;; 5) ch=G ;; 6) ch=H ;; 7) ch=I ;; + *) echo bad unit for $name in: $i ;; + esac;; + dhu*) name=dhu; major=34; count=16; + unit=${i#dhu} + case $unit in + 0) ch=S ;; 1) ch=T ;; 2) ch=U ;; 3) ch=V ;; + 4) ch=W ;; 5) ch=X ;; 6) ch=Y ;; 7) ch=Z ;; + *) echo bad unit for $name in: $i ;; + esac;; + dh*) name=dh; major=12; count=16; + unit=${i#dh} + case $unit in + 0) ch=h ;; 1) ch=i ;; 2) ch=j ;; 3) ch=k ;; + 4) ch=l ;; 5) ch=m ;; 6) ch=n ;; 7) ch=o ;; + *) echo bad unit for $name in: $i ;; + esac;; + esac + i=0 + while [ $i -lt $count ]; do + let=${cnvtbl[$i]} + if [ -n "$let" ] ;then + rm -f tty${ch}${let} + mknod tty${ch}${let} c $major $(($unit * $count + $i)) + else + echo bad count for ${name}: $unit, $count, $i + fi + i=$(($i + 1)) + done + ;; + +dl*) + unit=${i#dl} + major=66 + let=${cnvtbl[$unit]} + if [ -n "$let" ] ;then + rm -f ttyJ${let} + mknod ttyJ${let} c $major $unit + else + echo bad number for ${name}: $unit + fi-})dnl +dnl target( all, hd, 0, 1, 2)dnl +target( all, mt, 0)dnl +target( all, uu, 0)dnl +target( all, st, 0)dnl +target( all, dhu, 0)dnl +target( all, dmz, 0)dnl +target( all, dmf, 0)dnl +target( all, dh, 0)dnl +target( all, dz, 0)dnl target(ramd, fd, 0)dnl target(ramd, sd, 0, 1, 2, 3)dnl target(ramd, rd, 0)dnl @@ -952,8 +1047,8 @@ dnl uncomment if multi mknod happens dnl ifelse(1, 0, [ "${mklist[{-$-}1]}" ] && mklist[{-$-}1]="${mklist[{-$-}1]} {-$-}2 {-$-}3 {-$-}4 {-$-}5" || { - mklist[{-$-}1]="mknod -m {-$-}1 {-$-}2 {-$-}3 {-$-}4 {-$-}5" - modes="$modes {-$-}1" + mklist[{-$-}1]="mknod -m {-$-}1 {-$-}2 {-$-}3 {-$-}4 {-$-}5" + modes="$modes {-$-}1" }, dnl dnl non multi mknod diff --git a/src/etc/etc.vax/MAKEDEV.md b/src/etc/etc.vax/MAKEDEV.md index e9852d2c..469feed6 100644 --- a/src/etc/etc.vax/MAKEDEV.md +++ b/src/etc/etc.vax/MAKEDEV.md @@ -1,5 +1,5 @@ vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.3 2002/02/14 13:24:45 todd Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.4 2002/02/14 14:32:26 todd Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001 Todd T. Fries @@ -46,31 +46,36 @@ _DEV(rx, 30, 12) _DEV(rl, 32, 14) _DEV(hd, 58, 19) _DEV(sd, 59, 20) -_DEV(cd, 58, 22) -_DEV(ch, 19) -_DEV(uk, 120) -_DEV(ss, 121) +_DEV(cd, 61, 22) +_DEV(ch, 63) +_DEV(ss, 64) +_DEV(uk, 65) _DEV(xy, 9, 3) _DEV(rd, 106, 23) _DEV(xd, 42, 10) _DEV(flo, 54, 16) -_DEV(vnd, 55, 8) +_DEV(vnd, 55, 18) _DEV(ccd, 54, 17) _TITLE(pty) _DEV(tty, 20) _DEV(pty, 21) _TITLE(prn) _TITLE(term) -dnl _DEV(ttyS, 34) +_DEV(dhu, 34) +_DEV(dh, 12) +_DEV(dmf, 22) +_DEV(dmz, 37) +_DEV(vt, 68) +_DEV(dz, 1) _TITLE(spec) _DEV(au, 69) _DEV(oppr) _DEV(bpf, 56) _DEV(pf, 42) _DEV(altq, 75) -_DEV(lkm, 112) -_DEV(tun, 111) -_DEV(rnd, 119) +_DEV(lkm, 28) +_DEV(tun, 57) +_DEV(rnd, 67) _DEV(mag) _DEV(xfs, 51) _DEV(raid, 73, 25) @@ -90,8 +95,8 @@ _std(2, 3, 50, 7, 33) M ttyg2 c 25 2 M ttyg3 c 25 3 M crl c 35 0 - M csa1 c 51 0 - M csa2 c 51 1 + M csa1 c 51 0 600 + M csa2 c 51 1 600 M tu0 b 8 0 M tu1 b 8 1 M kUmem c 3 3 660