Browse Source

sync

OPENBSD_2_4
todd 26 years ago
parent
commit
1d04499ce4
5 changed files with 128 additions and 91 deletions
  1. +8
    -8
      src/etc/etc.alpha/MAKEDEV
  2. +4
    -4
      src/etc/etc.amiga/MAKEDEV
  3. +3
    -3
      src/etc/etc.arc/MAKEDEV
  4. +2
    -2
      src/etc/etc.arm32/MAKEDEV
  5. +111
    -74
      src/etc/etc.sparc/MAKEDEV

+ 8
- 8
src/etc/etc.alpha/MAKEDEV View File

@ -1,5 +1,5 @@
#!/bin/sh - #!/bin/sh -
# $OpenBSD: MAKEDEV,v 1.38 1998/09/25 09:51:09 todd Exp $
# $OpenBSD: MAKEDEV,v 1.39 1998/09/25 11:11:58 todd Exp $
# $NetBSD: MAKEDEV,v 1.8.4.1 1996/06/18 00:41:56 cgd Exp $ # $NetBSD: MAKEDEV,v 1.8.4.1 1996/06/18 00:41:56 cgd Exp $
# #
# Copyright (c) 1990 The Regents of the University of California. # Copyright (c) 1990 The Regents of the University of California.
@ -36,20 +36,20 @@
# @(#)MAKEDEV 5.5 (Berkeley) 5/28/91 # @(#)MAKEDEV 5.5 (Berkeley) 5/28/91
# Device "make" file. Valid arguments: # Device "make" file. Valid arguments:
# all makes all known devices, including local devices. # all makes all known devices, including local devices.
# Tries to make the 'standard' number of each type.
# Tries to make the ``standard'' number of each type.
# std standard devices # std standard devices
# local configuration specific devices # local configuration specific devices
# #
# Tapes: # Tapes:
# st* SCSI tape
# st* SCSI tapes
# #
# Disks: # Disks:
# sd* SCSI disks # sd* SCSI disks
# cd* SCSI cdrom drives # cd* SCSI cdrom drives
# vnd* "file" pseudo-disks # vnd* "file" pseudo-disks
# ccd* concatenated disk devices # ccd* concatenated disk devices
# wd* IDE disks
# acd* ATAPI cdrom drives
# wd* ISA "winchester" disk drives (ST506,IDE,ESDI,RLL,...)
# acd* ISA ATAPI cdrom drives
# #
# Terminal ports: # Terminal ports:
# ttyB? DEC 3000 ZS8530 ("scc") serial ports # ttyB? DEC 3000 ZS8530 ("scc") serial ports
@ -65,15 +65,15 @@
# #
# Special purpose devices: # Special purpose devices:
# ch* SCSI media changer # ch* SCSI media changer
# bpf* packet filter
# fd file descriptors
# bpf* Berkeley Packet Filter
# fd makes fd/* for the fdescfs.
# lkm loadable kernel modules interface # lkm loadable kernel modules interface
# tun* network tunnel driver # tun* network tunnel driver
# mmclock memory mapped clock # mmclock memory mapped clock
# kbd keyboard (provides events, for X11) # kbd keyboard (provides events, for X11)
# mouse mouse (provides events, for X11) # mouse mouse (provides events, for X11)
# *random inkernal random data source # *random inkernal random data source
# uk* unknown SCSI
# uk* SCSI Unknown device
# ss* SCSI scanners # ss* SCSI scanners
# ipl IP filter log # ipl IP filter log


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

@ -1,6 +1,5 @@
#!/bin/sh - #!/bin/sh -
#
# $OpenBSD: MAKEDEV,v 1.37 1998/09/25 10:22:15 todd Exp $
# $OpenBSD: MAKEDEV,v 1.38 1998/09/25 11:11:58 todd Exp $
# $NetBSD: MAKEDEV,v 1.21 1996/05/19 21:03:49 veego Exp $ # $NetBSD: MAKEDEV,v 1.21 1996/05/19 21:03:49 veego Exp $
# #
# Copyright (c) 1990 The Regents of the University of California. # Copyright (c) 1990 The Regents of the University of California.
@ -34,6 +33,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
# #
# @(#)MAKEDEV 5.5 (Berkeley) 5/28/91
# from: # from:
# hp300/MAKEDEV (1/15/94), from: # hp300/MAKEDEV (1/15/94), from:
# @(#)MAKEDEV 5.5 (Berkeley) 5/28/91 # @(#)MAKEDEV 5.5 (Berkeley) 5/28/91
@ -50,7 +50,7 @@
# st* SCSI tapes # st* SCSI tapes
# #
# Disks: # Disks:
# fd* Floppy disks
# fd* Floppy disk drives (3 1/2", 5 1/4")
# sd* SCSI disks # sd* SCSI disks
# cd* SCSI cdrom drives # cd* SCSI cdrom drives
# vnd* "file" pseudo-disks # vnd* "file" pseudo-disks
@ -89,7 +89,7 @@
# tun* network tunnel driver # tun* network tunnel driver
# ipf IP filter # ipf IP filter
# ss* SCSI scanners # ss* SCSI scanners
# uk* unknown SCSI
# uk* SCSI Unknown device
# *random inkernal random data source # *random inkernal random data source
# audio* one unit of the audio device. Unit 0 is custom chip audio. # audio* one unit of the audio device. Unit 0 is custom chip audio.


+ 3
- 3
src/etc/etc.arc/MAKEDEV View File

@ -1,5 +1,5 @@
#!/bin/sh - #!/bin/sh -
# $OpenBSD: MAKEDEV,v 1.27 1998/09/25 10:40:58 todd Exp $
# $OpenBSD: MAKEDEV,v 1.28 1998/09/25 11:11:58 todd Exp $
# @(#)MAKEDEV 8.1 (Berkeley) 6/9/93 # @(#)MAKEDEV 8.1 (Berkeley) 6/9/93
# #
@ -14,7 +14,7 @@
# st* SCSI tapes # st* SCSI tapes
# #
# Disks: # Disks:
# fd* Floppy disks
# fd* Floppy disk drives (3 1/2", 5 1/4")
# sd* SCSI disks # sd* SCSI disks
# wd* ISA "winchester" disk drives (ST506,IDE,ESDI,RLL,...) # wd* ISA "winchester" disk drives (ST506,IDE,ESDI,RLL,...)
# cd* SCSI cdrom drives # cd* SCSI cdrom drives
@ -119,7 +119,7 @@ case $i in
all) all)
sh $this std fd fd0 wd0 wd1 wd2 wd3 sd0 sd1 sd2 st0 acd0 cd0 ss0 sh $this std fd fd0 wd0 wd1 wd2 wd3 sd0 sd1 sd2 st0 acd0 cd0 ss0
sh $this ccd0 ccd1 ccd2
sh $this ccd0 ccd1 ccd2 xfs0
sh $this vnd0 vnd1 vnd2 vnd3 tty00 tty01 tty02 tty03 pty0 pty1 sh $this vnd0 vnd1 vnd2 vnd3 tty00 tty01 tty02 tty03 pty0 pty1
sh $this bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 sh $this bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9
sh $this ipl tun0 tun1 tun2 sh $this ipl tun0 tun1 tun2


+ 2
- 2
src/etc/etc.arm32/MAKEDEV View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: MAKEDEV,v 1.12 1998/09/25 11:02:43 todd Exp $
# $OpenBSD: MAKEDEV,v 1.13 1998/09/25 11:11:59 todd Exp $
# $NetBSD: MAKEDEV,v 1.3 1996/04/26 20:10:24 mark Exp $ # $NetBSD: MAKEDEV,v 1.3 1996/04/26 20:10:24 mark Exp $
# #
# Copyright (c) 1990 The Regents of the University of California. # Copyright (c) 1990 The Regents of the University of California.
@ -96,7 +96,7 @@ case $i in
all) all)
sh $this std fd fd0 fd1 wd0 wd1 rd0 rd1 sd0 sd1 sd2 tty0 tty1 pty0 pty1 sh $this std fd fd0 fd1 wd0 wd1 rd0 rd1 sd0 sd1 sd2 tty0 tty1 pty0 pty1
sh $this st0 st1 ch0 cd0 cd1 vnd0 vnd1 ccd0 ccd1 uk0 uk1 ss0
sh $this st0 st1 ch0 cd0 cd1 vnd0 vnd1 ccd0 ccd1 uk0 uk1 ss0 xfs0
sh $this ttyv0 ttyv1 ttyv2 ttyv3 ttyv4 ttyv5 ttyv6 ttyv7 ttyv8 ttyv9 sh $this ttyv0 ttyv1 ttyv2 ttyv3 ttyv4 ttyv5 ttyv6 ttyv7 ttyv8 ttyv9
sh $this bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 sh $this bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9
sh $this lpa0 lpt0 tun0 tun1 tun2 random sh $this lpa0 lpt0 tun0 tun1 tun2 random


+ 111
- 74
src/etc/etc.sparc/MAKEDEV View File

@ -1,6 +1,5 @@
#!/bin/sh - #!/bin/sh -
#
# $OpenBSD: MAKEDEV,v 1.48 1998/09/21 23:15:53 deraadt Exp $
# $OpenBSD: MAKEDEV,v 1.49 1998/09/25 11:11:59 todd Exp $
# #
# Copyright (c) 1990 The Regents of the University of California. # Copyright (c) 1990 The Regents of the University of California.
# All rights reserved. # All rights reserved.
@ -36,51 +35,67 @@
# @(#)MAKEDEV 5.5 (Berkeley) 5/28/91 # @(#)MAKEDEV 5.5 (Berkeley) 5/28/91
# #
# Device "make" file. Valid arguments: # Device "make" file. Valid arguments:
# all makes all known devices, including local devices.
# Tries to make the ``standard'' number of each type.
# std standard devices # std standard devices
# local configuration specific devices # local configuration specific devices
#
# Tapes: # Tapes:
# st* SCSI tape
# st* SCSI tapes
#
# Disks: # Disks:
# sd* SCSI disks # sd* SCSI disks
# cd* SCSI cdrom drives # cd* SCSI cdrom drives
# ch* SCSI changer
# uk* unknown SCSI
# ch* SCSI media changer
# uk* SCSI Unknown device
# ss* SCSI scanners # ss* SCSI scanners
# xy* Xylogic 450/451 disks # xy* Xylogic 450/451 disks
# rd* "ramdisk" pseudo-disks # rd* "ramdisk" pseudo-disks
# xd* Xylogic 753/7053 disks # xd* Xylogic 753/7053 disks
# fd* Floppies
# fd* Floppy disk drives (3 1/2", 5 1/4")
# vnd* "file" pseudo-disks # vnd* "file" pseudo-disks
# ccd* concatenated disk devices # ccd* concatenated disk devices
#
# Pseudo terminals: # Pseudo terminals:
# pty* set of 16 master and slave pseudo terminals # pty* set of 16 master and slave pseudo terminals
#
# Printers: # Printers:
#
# Terminal ports: # Terminal ports:
# tty[a-d] onboard zs serial ports # tty[a-d] onboard zs serial ports
# cua[a-d] onboard zs serial ports # cua[a-d] onboard zs serial ports
#
# Special purpose devices: # Special purpose devices:
# audio
# openprom
# bwtwo*
# cgtwo*
# cgthree*
# cgfour*
# cgsix*
# cgeight*
# cgfourteen*
# tcx*
# bpf* packet filter
# audio
# openprom
# bwtwo*
# cgtwo*
# cgthree*
# cgfour*
# cgsix*
# cgeight*
# cgfourteen*
# tcx*
# bpf* Berkeley Packet Filter
# lkm loadable kernel modules interface # lkm loadable kernel modules interface
# tun* network tunnel driver # tun* network tunnel driver
# *random random data source
# *random inkernal random data source
# magma* magma card (makes 16 tty and 2 bpp) # magma* magma card (makes 16 tty and 2 bpp)
# xfs* XFS filesystem devices
# ipl IP filter log
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:/usr/etc
PATH=/sbin:/bin:/usr/bin:/usr/sbin
this=$0 this=$0
umask 77 umask 77
case "$os" in # set os in the environment if not OpenBSD
SunOS) add ()
if ! [ "$os" ]; then
os=OpenBSD
fi
# SunOS shell support functions
if [ "$os" = "SunOS" ]
then
add ()
{ {
expr $1 + $2 expr $1 + $2
} }
@ -91,27 +106,36 @@ SunOS) add ()
hex () hex ()
{ {
case $1 in case $1 in
[0-9]) echo $1;;
10) echo a;;
11) echo b;;
12) echo c;;
13) echo d;;
14) echo e;;
15) echo f;;
[0-9]) echo -n $1;;
10) echo -n a;;
11) echo -n b;;
12) echo -n c;;
13) echo -n d;;
14) echo -n e;;
15) echo -n f;;
esac esac
} }
trunc () trunc ()
{ {
expr $1 : $2'\(.*\)' expr $1 : $2'\(.*\)'
} }
unt ()
unt()
{ {
expr $1 : '[a-z]*\([0-9]*\)[a-p]*' expr $1 : '[a-z]*\([0-9]*\)[a-p]*'
} }
;;
*) add ()
fi
# OpenBSD shell support functions
if [ "$os" = "OpenBSD" ]
then
add ()
{ {
echo "$(( $1 + $2 ))"
tmp=0
while [ "$1" ]
do
tmp=$(( $1 + $tmp ))
shift
done
echo $tmp
} }
mult () mult ()
{ {
@ -120,7 +144,7 @@ SunOS) add ()
hex () hex ()
{ {
case $1 in case $1 in
[0-9]) echo -n $1 ;;
[0-9]) echo -n $1;;
10) echo -n a;; 10) echo -n a;;
11) echo -n b;; 11) echo -n b;;
12) echo -n c;; 12) echo -n c;;
@ -137,54 +161,60 @@ SunOS) add ()
arg2="$2" arg2="$2"
echo ${arg1#$arg2} echo ${arg1#$arg2}
} }
unt ()
unt()
{ {
# XXX pdksh can't seem to deal with locally scoped variables # XXX pdksh can't seem to deal with locally scoped variables
# in ${foo#$bar} expansions # in ${foo#$bar} expansions
arg1="$1" arg1="$1"
if [ "${arg1#xy}" != "$arg1" ]
then
unt=${arg1#xy}
else
unt=${arg1#*d}
fi
echo ${unt%*[a-p]}
tmp="${arg1#[a-z]*}"
while [ "$tmp" != "$arg1" ]
do
arg1=$tmp
tmp="${arg1#[a-z]*}"
done
tmp="${arg1%*[a-z]}"
while [ "$tmp" != "$arg1" ]
do
arg1=$tmp
tmp="${arg1%*[a-z]}"
done
echo $arg1
} }
;;
esac
fi
for i for i
do do
unit=`expr $i : '[a-z][a-z]*\([0-9][0-9]*\)'`
unit=`unt $i`
[ "$unit" ] || unit=0 [ "$unit" ] || unit=0
case $i in case $i in
all) all)
sh ${this} std sd0 sd1 sd2 sd3 sd4 xd0 xd1 xd2 xd3 xy0 xy1 xy2 xy3
sh ${this} cd0 st0 st1 rd0
sh ${this} fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H
sh ${this} uk0 uk1
sh ${this} ss0 ss1
sh ${this} pty0 vnd0 vnd1 vnd2 vnd3 audio tun0 tun1 tun2 tun3
sh ${this} ccd0 ccd1 ccd2 ccd3
sh ${this} bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9
sh ${this} ipl
sh ${this} bwtwo0 cgtwo0 cgthree0 cgfour0 cgsix0
sh ${this} cgeight0 cgfourteen0 tcx0
sh ${this} lkm random local
sh $this std sd0 sd1 sd2 sd3 sd4 xd0 xd1 xd2 xd3 xy0 xy1 xy2 xy3
sh $this cd0 st0 st1 rd0
sh $this fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H
sh $this uk0 uk1
sh $this ss0 ss1
sh $this pty0 vnd0 vnd1 vnd2 vnd3 audio tun0 tun1 tun2 tun3
sh $this ccd0 ccd1 ccd2 ccd3
sh $this bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9
sh $this ipl
sh $this bwtwo0 cgtwo0 cgthree0 cgfour0 cgsix0
sh $this cgeight0 cgfourteen0 tcx0
sh $this lkm random local
sh $this xfs0
;; ;;
floppy) floppy)
sh ${this} std random
sh ${this} fd0 sd0 sd1
sh $this std random
sh $this fd0 sd0 sd1
;; ;;
ramdisk) ramdisk)
sh ${this} std random
sh ${this} fd0 sd0 sd1 sd2 sd3 rd0 cd0
sh ${this} bpf0
sh $this std random
sh $this fd0 sd0 sd1 sd2 sd3 rd0 cd0
sh $this bpf0
;; ;;
std) std)
@ -203,8 +233,8 @@ std)
mknod stdin c 24 0 ; chmod 666 stdin mknod stdin c 24 0 ; chmod 666 stdin
mknod stdout c 24 1 ; chmod 666 stdout mknod stdout c 24 1 ; chmod 666 stdout
mknod stderr c 24 2 ; chmod 666 stderr mknod stderr c 24 2 ; chmod 666 stderr
sh ${this} ttya ttyb ttyc ttyd
sh ${this} cuaa cuab cuac cuad
sh $this ttya ttyb ttyc ttyd
sh $this cuaa cuab cuac cuad
mknod fb c 22 0 ; chmod 666 fb mknod fb c 22 0 ; chmod 666 fb
mknod mouse c 13 0 ; chmod 666 mouse mknod mouse c 13 0 ; chmod 666 mouse
mknod kbd c 29 0 ; chmod 666 kbd mknod kbd c 29 0 ; chmod 666 kbd
@ -254,26 +284,33 @@ tcx*)
;; ;;
audio*) audio*)
unit=${i#audio}
major=69
audio=audio$unit audio=audio$unit
sound=sound$unit sound=sound$unit
mixer=mixer$unit mixer=mixer$unit
major=69
audioctl=audioctl$unit audioctl=audioctl$unit
if [ "$unit" = "" ]; then unit=0; fi
rm -f $audio $sound $mixer $audioctl rm -f $audio $sound $mixer $audioctl
mknod $sound c $major $(($unit + 0))
mknod $audio c $major $(($unit + 128))
mknod $mixer c $major $(($unit + 16))
mknod $audioctl c $major $(($unit + 192))
chown root.wheel $audio $sound $mixer $audioctl
mknod $sound c $major $unit
mknod $audio c $major `add $unit 128`
mknod $mixer c $major `add $unit 16`
mknod $audioctl c $major `add $unit 192`
chown root.wheel $audio $sound $mixer $audioioctl
chmod 666 $audio $sound $mixer $audioctl chmod 666 $audio $sound $mixer $audioctl
;; ;;
xfs*)
rm -f xfs$unit
mknod xfs$unit c 51 $unit
chmod 600 xfs$unit
chown root.wheel xfs$unit
;;
openprom) openprom)
mknod openprom c 70 0; chmod 600 openprom
rm -f openprom
mknod openprom c 70 0 ;chmod 600 openprom
;; ;;
bpf*) bpf*)
rm -f bpf$unit rm -f bpf$unit
mknod bpf$unit c 105 $unit mknod bpf$unit c 105 $unit
@ -377,7 +414,7 @@ ccd*|sd*|xd*|xy*|cd*)
n=0 n=0
while [ $n -lt 32 ] while [ $n -lt 32 ]
do do
sh ${this} $name$n
sh $this $name$n
n=`add $n 1` n=`add $n 1`
done done
fi fi
@ -414,7 +451,7 @@ vnd*)
n=0 n=0
while [ $n -lt 32 ] while [ $n -lt 32 ]
do do
sh ${this} $name$n
sh $this $name$n
n=`add $n 1` n=`add $n 1`
done done
fi fi


Loading…
Cancel
Save