@ -1,5 +1,5 @@
vers(__file__,
vers(__file__,
{-$OpenBSD: MAKEDEV.md,v 1.24 2006/07/30 12:32:41 miod Exp $-},
{-$OpenBSD: MAKEDEV.md,v 1.25 2006/08/02 19:08:42 miod Exp $-},
etc.MACHINE)dnl
etc.MACHINE)dnl
dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries < todd @ OpenBSD . org >
dnl Copyright (c) 2001-2006 Todd T. Fries < todd @ OpenBSD . org >
@ -20,82 +20,52 @@ dnl
dnl *** vax specific definitions
dnl *** vax specific definitions
dnl
dnl
__devitem(hd, hd*, {-HDC9224 disks-})dnl
__devitem(hd, hd*, {-HDC9224 disks-})dnl
__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)-})dnl
__devitem(vt, vt*, {-console-})dnl
__devitem(dz, dz*, UNIBUS DZ11 and DZ32)dnl
__devitem(dz, dz*, UNIBUS DZ11 and DZ32)dnl
__devitem(dl, dl*, UNIBUS DL11)dnl
_mkdev(dz, dz*,
_mkdev(dz, dz*,
{-case $U in
{-case $U in
[0-7])
[0-7])
i=0
i=0
while [ $i -lt 8 ]; do
while [ $i -lt 8 ]; do
no=Add(Mult($U, 8), $i)
no=Add(Mult($U, 8), $i)
if [ $no -lt 10 ]; then
if [ $no -lt 10 ]; then
no="0${no}"
no="0${no}"
fi
fi
M tty${no} c 1 $no 600
M tty${no} c 1 $no 600
let i=i+1
i="$(( $i + 1 ))"
done
done
;;
;;
*)
*)
echo bad unit for dz in: $i
echo bad unit for dz in: $i
;;
;;
esac-})dnl
esac-})dnl
dnl XXX split this up abit?
__devitem(dhu, dhu*, UNIBUS DHU11)dnl
_mkdev(dhu, dhu*|dmz*|dmf*|dh*|vt*,
_mkdev(dhu, dhu*,
{-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
{-set -A cnvtbl 0 1 2 3 4 5 6 7 8 9 a b c d e f
case $i in
case $U in
vt*) name=vt; major=68; count=8;
[0-7])
case $U in
0) ch=w ;;
*) echo bad unit for $name in: $i ;;
esac;;
dmz*) name=dmz; major=37; count=24;
case $U 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;
case $U 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;
case $U in
case $U in
0) ch=S ;; 1) ch=T ;; 2) ch=U ;; 3) ch=V ;;
0) ch=S ;; 1) ch=T ;; 2) ch=U ;; 3) ch=V ;;
4) ch=W ;; 5) ch=X ;; 6) ch=Y ;; 7) ch=Z ;;
4) ch=W ;; 5) ch=X ;; 6) ch=Y ;; 7) ch=Z ;;
*) echo bad unit for $name in: $i ;;
esac
esac;;
i=0
dh*) name=dh; major=12; count=16;
while [ $i -lt 16 ]; do
case $U in
let=${cnvtbl[$i]}
0) ch=h ;; 1) ch=i ;; 2) ch=j ;; 3) ch=k ;;
M tty${ch}${let} c major_dhu_c Add(Mult($U, 16), $i) 600
4) ch=l ;; 5) ch=m ;; 6) ch=n ;; 7) ch=o ;;
i="$(( $i + 1 ))"
*) echo bad unit for $name in: $i ;;
done
esac;;
esac
i=0
while [ $i -lt $count ]; do
let=${cnvtbl[$i]}
if [ -n "$let" ] ;then
M tty${ch}${let} c $major Add(Mult($U, $count), $i) 600
else
echo bad count for ${name}: $U, $count, $i
fi
let i=i+1
done
;;
;;
*)
dl*)
echo bad unit for dhu in: $i
major=66
;;
esac-})dnl
__devitem(dl, dl*, UNIBUS DL11)dnl
_mkdev(dl, dl*,
{-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
let=${cnvtbl[$U]}
let=${cnvtbl[$U]}
if [ -n "$let" ] ;then
if [ -n "$let" ] ;then
M ttyJ${let} c $major $U 600
M ttyJ${let} c major_dl_c $U 600
else
else
echo bad number for ${name}: $U
echo bad unit for dl in: $i
fi-})dnl
fi-})dnl
dnl
dnl
dnl
dnl
@ -129,13 +99,9 @@ _DEV(tm, 14, 5)
_DEV(ts, 16, 6)
_DEV(ts, 16, 6)
_DEV(ut, 17, 10)
_DEV(ut, 17, 10)
_TITLE(term)
_TITLE(term)
_DEV(dh, 12)
_DEV(dhu, 34)
_DEV(dhu, 34)
_DEV(dl, 66)
_DEV(dl, 66)
_DEV(dmf, 22)
_DEV(dmz, 37)
_DEV(dz, 1)
_DEV(dz, 1)
_DEV(vt, 68)
_TITLE(pty)
_TITLE(pty)
_DEV(ptm, 75)
_DEV(ptm, 75)
_DEV(pty, 21)
_DEV(pty, 21)
@ -242,9 +208,6 @@ target( all, ts, 0, 1)dnl
target( all, uu, 0)dnl
target( all, uu, 0)dnl
target( all, st, 0, 1)dnl
target( all, st, 0, 1)dnl
target( all, dhu, 0)dnl
target( all, dhu, 0)dnl
dnl target( all, dmz, 0)dnl
dnl target( all, dmf, 0)dnl
dnl target( all, dh, 0)dnl
target( all, dz, 0)dnl
target( all, dz, 0)dnl
target( all, dl, 0)dnl
target( all, dl, 0)dnl
target( all, vt, 0)dnl
target( all, vt, 0)dnl