summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2002-01-08 05:29:15 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2002-01-08 05:29:15 +0000
commitff6aa95a56a8de0c2342fb3724a7e4eddbad88d8 (patch)
treec5a1beb496073fc4f524aedab0298b6cdbac6dd4
parent3c5eecf1a42f0f5d7987e3656fbde9a0be4f1783 (diff)
sync
-rw-r--r--etc/Makefile8
-rw-r--r--etc/etc.alpha/MAKEDEV4
-rw-r--r--etc/etc.i386/MAKEDEV8
-rw-r--r--etc/etc.mac68k/MAKEDEV4
-rw-r--r--etc/etc.macppc/MAKEDEV895
-rw-r--r--etc/etc.sparc64/MAKEDEV4
-rw-r--r--etc/etc.sun3/MAKEDEV4
7 files changed, 365 insertions, 562 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 3712ee79bc4..982c159e5e9 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.138 2002/01/08 01:06:44 todd Exp $
+# $OpenBSD: Makefile,v 1.139 2002/01/08 05:29:13 todd Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= US/Pacific
@@ -318,13 +318,13 @@ snap_md:
.endif # DESTDIR check
-#MAKEDEVARCHS+= alpha
+MAKEDEVARCHS+= alpha
#MAKEDEVARCHS+= amiga
#MAKEDEVARCHS+= hp300
#MAKEDEVARCHS+= hppa
MAKEDEVARCHS+= i386
-#MAKEDEVARCHS+= mac68k
-#MAKEDEVARCHS+= macppc
+MAKEDEVARCHS+= mac68k
+MAKEDEVARCHS+= macppc
#MAKEDEVARCHS+= sparc
MAKEDEVARCHS+= sparc64
MAKEDEVARCHS+= sun3
diff --git a/etc/etc.alpha/MAKEDEV b/etc/etc.alpha/MAKEDEV
index a3532ff795f..4e9a7352bd0 100644
--- a/etc/etc.alpha/MAKEDEV
+++ b/etc/etc.alpha/MAKEDEV
@@ -4,10 +4,10 @@
# generated from:
#
# OpenBSD: etc.alpha/MAKEDEV.md,v 1.1 2002/01/08 01:33:19 todd Exp
-# OpenBSD: MAKEDEV.mi,v 1.14 2002/01/08 03:26:04 todd Exp
+# OpenBSD: MAKEDEV.mi,v 1.15 2002/01/08 05:10:38 todd Exp
# OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp
#
-# $OpenBSD: MAKEDEV,v 1.62 2002/01/08 03:28:59 todd Exp $
+# $OpenBSD: MAKEDEV,v 1.63 2002/01/08 05:29:13 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.
diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV
index fea3bb31ab6..6a9181237d0 100644
--- a/etc/etc.i386/MAKEDEV
+++ b/etc/etc.i386/MAKEDEV
@@ -4,10 +4,10 @@
# generated from:
#
# OpenBSD: etc.i386/MAKEDEV.md,v 1.1 2002/01/07 07:52:35 todd Exp
-# OpenBSD: MAKEDEV.mi,v 1.14 2002/01/08 03:26:04 todd Exp
+# OpenBSD: MAKEDEV.mi,v 1.15 2002/01/08 05:10:38 todd Exp
# OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp
#
-# $OpenBSD: MAKEDEV,v 1.108 2002/01/08 03:28:59 todd Exp $
+# $OpenBSD: MAKEDEV,v 1.109 2002/01/08 05:29:13 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.
@@ -361,7 +361,7 @@ lkm)
;;
speaker)
- M speaker$U c 27 $U 600
+ M speaker c 27 0 600
;;
bpf*)
@@ -571,7 +571,7 @@ all)
R ttyc0 ttyc1 ttyc2 ttyc3 ttyc4 ttyc5 ttyc6 ttyc7
R tty00 tty01 tty02 tty03 lkm lpa0 lpt0 lpa1 lpt1 lpa2 lpt2
R joy0 joy1 random ses0 uk0 uk1 ss0 ss1 wt0 wdt0 xfs0 audio0
- R music0 radio0 tuner0
+ R speaker music0 radio0 tuner0
R rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 usbs
R iop0 iop1 pci wscons
;;
diff --git a/etc/etc.mac68k/MAKEDEV b/etc/etc.mac68k/MAKEDEV
index 2d3757241db..7945542ade5 100644
--- a/etc/etc.mac68k/MAKEDEV
+++ b/etc/etc.mac68k/MAKEDEV
@@ -4,10 +4,10 @@
# generated from:
#
# OpenBSD: etc.mac68k/MAKEDEV.md,v 1.1 2002/01/08 03:14:50 todd Exp
-# OpenBSD: MAKEDEV.mi,v 1.14 2002/01/08 03:26:04 todd Exp
+# OpenBSD: MAKEDEV.mi,v 1.15 2002/01/08 05:10:38 todd Exp
# OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp
#
-# $OpenBSD: MAKEDEV,v 1.36 2002/01/08 03:28:59 todd Exp $
+# $OpenBSD: MAKEDEV,v 1.37 2002/01/08 05:29:13 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.
diff --git a/etc/etc.macppc/MAKEDEV b/etc/etc.macppc/MAKEDEV
index 8608c5e8f10..71dd58c8f93 100644
--- a/etc/etc.macppc/MAKEDEV
+++ b/etc/etc.macppc/MAKEDEV
@@ -1,107 +1,97 @@
#!/bin/sh -
-# $OpenBSD: MAKEDEV,v 1.4 2001/12/12 19:20:16 jason Exp $
#
-# Copyright (c) 1990 The Regents of the University of California.
-# All rights reserved.
+# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
+# generated from:
+#
+# OpenBSD: etc.macppc/MAKEDEV.md,v 1.2 2002/01/08 03:26:03 todd Exp
+# OpenBSD: MAKEDEV.mi,v 1.15 2002/01/08 05:10:38 todd Exp
+# OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp
#
-# Written and contributed by W. Jolitz 12/90
+# $OpenBSD: MAKEDEV,v 1.5 2002/01/08 05:29:13 todd Exp $
#
-# Redistribution and use in source and binary forms are permitted provided
-# that: (1) source distributions retain this entire copyright notice and
-# comment, and (2) distributions including binaries display the following
-# acknowledgement: ``This product includes software developed by the
-# University of California, Berkeley and its contributors'' in the
-# documentation or other materials provided with the distribution and in
-# all advertising materials mentioning features or use of this software.
-# Neither the name of the University nor the names of its contributors may
-# be used to endorse or promote products derived from this software without
-# specific prior written permission.
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
+# All rights reserved.
#
-# from: @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
-# $NetBSD: MAKEDEV,v 1.17 1996/02/03 15:02:42 briggs Exp $
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# 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
-# fd makes fd/* for the fdescfs.
+# fd makes fd/* for the fdescfs
# local configuration specific devices
# ramdisk makes all devices for a ramdisk kernel
-#
# Tapes:
# st* SCSI tapes
-#
# Disks:
-# fd* Floppy disk drives (3 1/2", 5 1/4")
-# wd* IDE disks
+# wd* "winchester" disk drives (ST506,IDE,ESDI,RLL,...)
# sd* SCSI disks
# cd* SCSI cdrom drives
+# ch* SCSI media changer
# vnd* "file" pseudo-disks
# rd* "ramdisk" pseudo-disks
-# ccd* concatenated disk devices
# raid* RAIDframe disk devices
-#
+# ccd* concatenated disk devices
+# Console ports:
+# ttyC0 wscons screen 0
+# ttyC* wscons virtual consoles
+# wskbd* wscons keyboards
+# wsmouse* wscons mice
+# wsmux wscons keyboard/mouse mux devices
# Terminal ports:
-# ttyC* wscons
-# tty* standard built-in serial ports (2)
-#
-# Pointing devices:
-# wsmouse* wscons mouse events
-#
-# Keyboard devices:
-# wskbd* wscons keyboard events
-#
+# ttyE? Workstation console (framebuffer & keyboard) tty emulators
+# tty0* NS16x50 serial ports
# Pseudo terminals:
-# pty* set of 16 master and slave pseudo terminals
-#
-# Graphics devices:
-# grf* custom chip (grf0), Retina Z2/Z3 (grf1/grf2),
-# Cirrus boards (grf3), A2410 (grf4) video or
-# CyberVision 64 (grf5)
-#
+# tty* set of 16 slave psuedo terminals
+# pty* set of 16 master pseudo terminals
# USB devices:
# usb* Bus control devices used by usbd for attach/detach
# uhid* Generic HID devices
+# ugen* Generic device
# ulpt* Printer devices
# urio* Diamond Multimedia Rio 500
-# ugen* Generic device
# utty* Serial ports
-#
+# uscanner* Scanners
# Special purpose devices:
-# apm power management device
-# audio* audio
-# ch* SCSI media changer
+# audio* audio device
+# apm power management device
# bpf* Berkeley Packet Filter
# tun* network tunnel driver
# lkm loadable kernel modules interface
-# *random inkernal random data source
-# altq ALTQ control interface
-# iop I2O controller device
-#
-
-PATH=/sbin:/bin:/usr/bin:/usr/sbin
-this=$0
-umask 77
-
-# default shell support functions
-add ()
-{
- tmp=0
- while [ "$1" ]
- do
- tmp=$(( $1 + $tmp ))
- shift
- done
- echo $tmp
-}
-mult ()
-{
- echo "$(( $1 * $2 ))"
-}
-hex ()
+# *random inkernel random data source
+# uk* SCSI Unknown device
+# ss* SCSI scanners
+# xfs* XFS filesystem devices
+# altq/ ALTQ control interface
+# iop* I2O controller device
+# pf* Packet Filter
+# crypto hardware crypto access driver
+# usbs make USB devices
+# pci PCI bus device
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+T=$0
+
+# set this to echo for Echo-Only debugging
+[ "$eo" ] || eo=
+
+hex()
{
case $1 in
[0-9]) echo -n $1;;
@@ -113,580 +103,393 @@ hex ()
15) echo -n f;;
esac
}
-trunc ()
+trunc()
{
# XXX pdksh can't seem to deal with locally scoped variables
# in ${foo#$bar} expansions
arg1="$1"
arg2="$2"
- echo ${arg1#$arg2}
+ case $3 in
+ l) echo ${arg2#$arg1} ;;
+ r|*) echo ${arg1#$arg2} ;;
+ esac
}
unt()
{
# XXX pdksh can't seem to deal with locally scoped variables
# in ${foo#$bar} expansions
- arg1="$1"
- tmp="${arg1#[a-z]*}"
- while [ "$tmp" != "$arg1" ]
+ arg="$1"
+ tmp="${arg#[a-zA-Z]*}"
+ tmp="${tmp%*[a-zA-Z]}"
+ while [ "$tmp" != "$arg" ]
do
- arg1=$tmp
- tmp="${arg1#[a-z]*}"
+ arg=$tmp
+ tmp="${arg#[a-zA-Z]*}"
+ tmp="${tmp%*[a-zA-Z]}"
done
- tmp="${arg1%*[a-z]}"
- while [ "$tmp" != "$arg1" ]
+ echo $arg
+}
+dodisk()
+{
+ n=$(($((${5}*${7:-16}))+${6})) count=0
+ RMlist="$RMlist $1$2? r$1$2?"
+ [ 0$7 -ne 8 ] && l="i j k l m n o p"
+ for d in a b c d e f g h $l
do
- arg1=$tmp
- tmp="${arg1%*[a-z]}"
+ M $1$2$d b $3 $(($n+$count)) 640
+ M r$1$2$d c $4 $(($n+$count)) 640
+ let count=count+1
done
- echo $arg1
+ MKlist="$MKlist;chown root.operator $1$2? r$1$2?"
+}
+dodisk2()
+{
+ n=$(($(($5*${7:-16}))+$6))
+ M $1$2a b $3 $n 640 operator
+ M r$1$2a c $4 $n 640 operator
+ n=$(($n+2))
+ M $1$2c b $3 $n 640 operator
+ M r$1$2c c $4 $n 640 operator
}
-for i
+# M name b/c major minor [mode] [group]
+RMlist="rm -f"
+MKlist=":"
+mkl() {
+ [ "${mklist[$1]}" ] && {
+ mklist[$1]="${mklist[$1]};mknod -m $1 $2 $3 $4 $5"
+ } || {
+ mklist[$1]="mknod -m $1 $2 $3 $4 $5"
+ modes="$modes $1"
+ }
+}
+M() {
+ RMlist="$RMlist $1"
+ mkl ${5-666} $1 $2 $3 $4
+ mklist="$mklist $1"
+ G=${6:-wheel}
+ [ "$7" ] && {
+ MKlist="$MKlist;chown $7.$G $1"
+ } || {
+ case $G in
+ wheel)g=0;;kmem)g=2;;operator)g=5;;tty)g=4;;dialer)g=117;;
+ esac
+ [ "${grplist[$g]}" ] && {
+ grplist[$g]="${grplist[$g]} $1"
+ } || {
+ groups="$groups $g"
+ grplist[$g]="chgrp $G $1"
+ }
+ }
+ return 0
+}
+R() {
+for i in "$@"
do
-
-unit=`unt $i`
-[ "$unit" ] || unit=0
+U=`unt $i`
+[ "$U" ] || U=0
case $i in
-
-all)
- sh $this std fd
- sh $this wd0 wd1 wd2 wd3
- sh $this sd0 sd1 sd2 sd3 st0 st1 cd0 cd1
- sh $this vnd0 vnd1 vnd2 vnd3
- sh $this ccd0 ccd1 ccd2 ccd3
- sh $this raid0 raid1 raid2 raid3
- sh $this rd0
- sh $this ttyC0 ttyCcfg
- sh $this tty00 tty01 tty02 tty03 pty0 pty1
- sh $this bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9
- sh $this pf tun0 tun1 tun2 tun3
- sh $this audio0
- sh $this random uk0 uk1 ss0 ss1
- sh $this wscons
- sh $this pci
- sh $this lkm xfs0 altq
- sh $this usbs
- sh $this iop0 iop1
- sh $this apm
- sh $this crypto
- sh $this local
- ;;
-
ramdisk)
- sh $this std
- sh $this wd0 wd1 wd2 wd3
- sh $this sd0 sd1 sd2 sd3 sd4 st0 st1 cd0 cd1
- sh $this rd0
- sh $this random
- sh $this bpf0
- sh $this tty00 tty01 pty0
- sh $this wscons
+ R std
+ R sd0 sd1 sd2 sd3 sd4 st0 st1 cd0 cd1
+ R rd0
+ R ttyE0
+ R random
+ R tty00 tty01 pty0
;;
std)
- rm -f console drum kmem mem reload zero null tty
- rm -f klog stdin stdout stderr ksyms
- mknod console c 0 0
- mknod drum c 3 0 ; chmod 640 drum ; chgrp kmem drum
- mknod kmem c 2 1 ; chmod 640 kmem ; chgrp kmem kmem
- mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem
- mknod reload c 2 20 ; chmod 640 reload ; chgrp kmem reload
- mknod zero c 2 12 ; chmod 666 zero
- mknod null c 2 2 ; chmod 666 null
- mknod tty c 1 0 ; chmod 666 tty
- mknod klog c 6 0 ; chmod 600 klog
- mknod stdin c 21 0 ; chmod 666 stdin
- mknod stdout c 21 1 ; chmod 666 stdout
- mknod stderr c 21 2 ; chmod 666 stderr
- mknod ksyms c 43 0 ; chmod 640 ksyms ; chown root.kmem ksyms
+ M console c 0 0 600
+ M tty c 1 0
+ M mem c 2 0 640 kmem
+ M kmem c 2 1 640 kmem
+ M null c 2 2
+ M zero c 2 12
+ M stdin c 21 0
+ M stdout c 21 1
+ M stderr c 21 2
+ M ksyms c 43 0 640 kmem
+ M drum c 3 0 640 kmem
+ M klog c 6 0 600
+ M reload c 2 20 640 kmem
+ ;;
+
+ttyE*)
+ type=E
+ case $type in
+ E) major=25; minor=$unit ;;
+ esac
+ M tty$type$unit c $major $minor
;;
-iop*)
- rm -f iop$unit
- mknod iop$unit c 73 $unit
- chown root.wheel iop$unit
- chmod 660 iop$unit
+pci)
+ M pci c 71 0 664
;;
usbs)
- sh $this usb0 usb1
- sh $this uhid0 uhid1 uhid2 uhid3
- sh $this ulpt0 ulpt1
- sh $this urio0 uscanner0
- sh $this utty0 utty1
+ R usb0 usb1 urio uscanner0 uhid0 uhid1 uhid2 uhid3
+ R ulpt0 ulpt1 ugen0 ugen1 utty0 utty1
;;
-fd)
- rm -f fd/*
- mkdir fd > /dev/null 2>&1
- n=0
- (cd fd && while [ $n -lt 64 ]; do mknod $n c 21 $n; n="$(( $n + 1 ))"; done)
- chown -R root.wheel fd
- chmod 555 fd
- chmod 666 fd/*
+crypto)
+ M crypto c 47 0
;;
-sd*|wd*|ccd*|ofdisk*|raid*)
- umask 2 ; unit=${i##*[a-z]}
- case $i in
- sd*) name=sd; blk=2; chr=8;;
- wd*) name=wd; blk=0; chr=11;;
- ofdisk*) name=ofdisk; blk=4; chr=13;;
- ccd*) name=ccd; blk=16; chr=18;;
- raid*) name=raid; blk=19; chr=54;;
- esac
- rm -f $name$unit? r$name$unit?
- case $unit in
- 0|1|2|3|4|5|6|7|8|9)
- mknod ${name}${unit}a b $blk $(( $unit * 16 + 0 ))
- mknod ${name}${unit}b b $blk $(( $unit * 16 + 1 ))
- mknod ${name}${unit}c b $blk $(( $unit * 16 + 2 ))
- mknod ${name}${unit}d b $blk $(( $unit * 16 + 3 ))
- mknod ${name}${unit}e b $blk $(( $unit * 16 + 4 ))
- mknod ${name}${unit}f b $blk $(( $unit * 16 + 5 ))
- mknod ${name}${unit}g b $blk $(( $unit * 16 + 6 ))
- mknod ${name}${unit}h b $blk $(( $unit * 16 + 7 ))
- mknod ${name}${unit}i b $blk $(( $unit * 16 + 8 ))
- mknod ${name}${unit}j b $blk $(( $unit * 16 + 9 ))
- mknod ${name}${unit}k b $blk $(( $unit * 16 + 10 ))
- mknod ${name}${unit}l b $blk $(( $unit * 16 + 11 ))
- mknod ${name}${unit}m b $blk $(( $unit * 16 + 12 ))
- mknod ${name}${unit}n b $blk $(( $unit * 16 + 13 ))
- mknod ${name}${unit}o b $blk $(( $unit * 16 + 14 ))
- mknod ${name}${unit}p b $blk $(( $unit * 16 + 15 ))
- mknod r${name}${unit}a c $chr $(( $unit * 16 + 0 ))
- mknod r${name}${unit}b c $chr $(( $unit * 16 + 1 ))
- mknod r${name}${unit}c c $chr $(( $unit * 16 + 2 ))
- mknod r${name}${unit}d c $chr $(( $unit * 16 + 3 ))
- mknod r${name}${unit}e c $chr $(( $unit * 16 + 4 ))
- mknod r${name}${unit}f c $chr $(( $unit * 16 + 5 ))
- mknod r${name}${unit}g c $chr $(( $unit * 16 + 6 ))
- mknod r${name}${unit}h c $chr $(( $unit * 16 + 7 ))
- mknod r${name}${unit}i c $chr $(( $unit * 16 + 8 ))
- mknod r${name}${unit}j c $chr $(( $unit * 16 + 9 ))
- mknod r${name}${unit}k c $chr $(( $unit * 16 + 10 ))
- mknod r${name}${unit}l c $chr $(( $unit * 16 + 11 ))
- mknod r${name}${unit}m c $chr $(( $unit * 16 + 12 ))
- mknod r${name}${unit}n c $chr $(( $unit * 16 + 13 ))
- mknod r${name}${unit}o c $chr $(( $unit * 16 + 14 ))
- mknod r${name}${unit}p c $chr $(( $unit * 16 + 15 ))
- chgrp operator ${name}${unit}[a-p] r${name}${unit}[a-p]
- chmod 640 ${name}${unit}[a-p] r${name}${unit}[a-p]
- ;;
- *)
- echo bad unit for disk in: $i
- ;;
- esac
- umask 77
+pf*)
+ M pf c 39 0 600
;;
-vnd*)
- umask 2 ; unit=${i##*[a-z]}
- for name in vnd svnd; do
- blk=14; chr=19;
- case $name in
- vnd) off=0;;
- svnd) off=128;;
- esac
- rm -f $name$unit? r$name$unit?
- mknod ${name}${unit}a b $blk $(( $unit * 16 + $off + 0 ))
- mknod ${name}${unit}b b $blk $(( $unit * 16 + $off + 1 ))
- mknod ${name}${unit}c b $blk $(( $unit * 16 + $off + 2 ))
- mknod ${name}${unit}d b $blk $(( $unit * 16 + $off + 3 ))
- mknod ${name}${unit}e b $blk $(( $unit * 16 + $off + 4 ))
- mknod ${name}${unit}f b $blk $(( $unit * 16 + $off + 5 ))
- mknod ${name}${unit}g b $blk $(( $unit * 16 + $off + 6 ))
- mknod ${name}${unit}h b $blk $(( $unit * 16 + $off + 7 ))
- mknod ${name}${unit}i b $blk $(( $unit * 16 + $off + 8 ))
- mknod ${name}${unit}j b $blk $(( $unit * 16 + $off + 9 ))
- mknod ${name}${unit}k b $blk $(( $unit * 16 + $off + 10 ))
- mknod ${name}${unit}l b $blk $(( $unit * 16 + $off + 11 ))
- mknod ${name}${unit}m b $blk $(( $unit * 16 + $off + 12 ))
- mknod ${name}${unit}n b $blk $(( $unit * 16 + $off + 13 ))
- mknod ${name}${unit}o b $blk $(( $unit * 16 + $off + 14 ))
- mknod ${name}${unit}p b $blk $(( $unit * 16 + $off + 15 ))
- mknod r${name}${unit}a c $chr $(( $unit * 16 + $off + 0 ))
- mknod r${name}${unit}b c $chr $(( $unit * 16 + $off + 1 ))
- mknod r${name}${unit}c c $chr $(( $unit * 16 + $off + 2 ))
- mknod r${name}${unit}d c $chr $(( $unit * 16 + $off + 3 ))
- mknod r${name}${unit}e c $chr $(( $unit * 16 + $off + 4 ))
- mknod r${name}${unit}f c $chr $(( $unit * 16 + $off + 5 ))
- mknod r${name}${unit}g c $chr $(( $unit * 16 + $off + 6 ))
- mknod r${name}${unit}h c $chr $(( $unit * 16 + $off + 7 ))
- mknod r${name}${unit}i c $chr $(( $unit * 16 + $off + 8 ))
- mknod r${name}${unit}j c $chr $(( $unit * 16 + $off + 9 ))
- mknod r${name}${unit}k c $chr $(( $unit * 16 + $off + 10 ))
- mknod r${name}${unit}l c $chr $(( $unit * 16 + $off + 11 ))
- mknod r${name}${unit}m c $chr $(( $unit * 16 + $off + 12 ))
- mknod r${name}${unit}n c $chr $(( $unit * 16 + $off + 13 ))
- mknod r${name}${unit}o c $chr $(( $unit * 16 + $off + 14 ))
- mknod r${name}${unit}p c $chr $(( $unit * 16 + $off + 15 ))
- chown root.operator ${name}${unit}[a-p] r${name}${unit}[a-p]
- chmod 640 ${name}${unit}[a-p] r${name}${unit}[a-p]
+iop*)
+ M iop$U c 73 $U 660
+ ;;
+
+altq)
+ RMlist="mkdir -p altq;$RMlist"
+ for d in altq cbq wfq afm fifoq red rio localq hfsc cdnr blue priq; do
+ M altq/$d c 72 $U 644
+ U=$(($U+1))
done
- umask 77
;;
-tty0*)
- unit=${i##tty0}
- rm -f tty0$unit cua0$unit
- mknod tty0$unit c 7 $unit
- mknod cua0$unit c 7 `expr $unit + 128`
- chown uucp.dialer tty0$unit cua0$unit
- chmod 660 tty0$unit cua0$unit
+xfs*)
+ M xfs$U c 51 $U 600
;;
-pty*)
- class=${i##*[a-z]}
- case $class in
- 0) offset=0 name=p;;
- 1) offset=16 name=q;;
- 2) offset=32 name=r;;
- 3) offset=48 name=s;;
- 4) offset=64 name=t;;
- 5) offset=80 name=u;;
- 6) offset=96 name=v;;
- 7) offset=112 name=w;;
- 8) offset=128 name=x;;
- 9) offset=144 name=y;;
- 10) offset=160 name=z;;
- 11) offset=176 name=P;;
- 12) offset=192 name=Q;;
- 13) offset=208 name=R;;
- 14) offset=224 name=S;;
- 15) offset=240 name=T;;
- *) echo bad unit for pty in: $i;;
- esac
- case $class in
- 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15)
- umask 0
- n=0
- while [ $n -lt 16 ]
- do
- nam=$name`hex $n`
- rm -f {tty,pty}$nam
- mknod tty$nam c 4 $(( $offset + $n ))
- mknod pty$nam c 5 $(( $offset + $n ))
- n="$(( $n + 1 ))"
- done
- umask 77
- ;;
- esac
+ss*)
+ M ss$U c 42 $U 440 operator
+ RMlist="$RMlist scan$U"
+ MKlist="$MKlist;umask 77;ln -s ss$U scan$U"
;;
-st*)
- umask 2 ; unit=${i##*[a-z]}
- case $i in
- st*) name=st; chr=20; blk=5;;
- esac
- rm -f $name$unit n$name$unit e$name$unit en$name$unit \
- r$name$unit nr$name$unit er$name$unit enr$name$unit
- case $unit in
- 0|1|2|3|4|5|6)
- mknod ${name}${unit} b $blk $(( $unit * 16 + 0 ))
- mknod n${name}${unit} b $blk $(( $unit * 16 + 1 ))
- mknod e${name}${unit} b $blk $(( $unit * 16 + 2 ))
- mknod en${name}${unit} b $blk $(( $unit * 16 + 3 ))
- mknod r${name}${unit} c $chr $(( $unit * 16 + 0 ))
- mknod nr${name}${unit} c $chr $(( $unit * 16 + 1 ))
- mknod er${name}${unit} c $chr $(( $unit * 16 + 2 ))
- mknod enr${name}${unit} c $chr $(( $unit * 16 + 3 ))
- chown root.operator ${name}${unit} n${name}${unit} \
- e$name$unit en$name$unit \
- r${name}${unit} nr${name}${unit} \
- er${name}${unit} enr${name}${unit}
- chmod 660 ${name}${unit} n${name}${unit} \
- e$name$unit en$name$unit \
- r${name}${unit} nr${name}${unit} \
- er${name}${unit} enr${name}${unit}
- ;;
- *)
- echo bad unit for tape in: $i
- ;;
- esac
- umask 77
+uk*)
+ M uk$U c 41 $U 640 operator
;;
-ch*)
- umask 2 ; unit=${i##*[a-z]}
- case $i in
- ch*) name=ch; chr=10;;
- esac
- rm -f $name$unit
- case $unit in
- 0|1|2|3|4|5|6)
- mknod ${name}${unit} c $chr $unit
- chown root.operator ${name}${unit}
- chmod 660 ${name}${unit}
- ;;
- *)
- echo bad unit for media changer in: $i
- ;;
- esac
- umask 77
+*random)
+ n=0
+ for pre in " " s u p a
+ do
+ M ${pre}random c 40 $n 644
+ n=$(($n+1))
+ done
;;
-cd*)
- umask 2 ; unit=${i##*[a-z]}
- case $i in
- cd*) name=cd; blk=3; chr=9;;
- esac
- rm -f $name$unit? r$name$unit?
- case $unit in
- 0|1|2|3|4|5|6)
- mknod ${name}${unit}a b $blk $(( $unit * 8 + 0 ))
- mknod ${name}${unit}c b $blk $(( $unit * 8 + 2 ))
- mknod r${name}${unit}a c $chr $(( $unit * 8 + 0 ))
- mknod r${name}${unit}c c $chr $(( $unit * 8 + 2 ))
- chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
- chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h]
- ;;
- *)
- echo bad unit for disk in: $i
- ;;
- esac
- umask 77
+lkm)
+ M lkm c 24 0 640 kmem
;;
-audio*)
- major=44
- audio=audio$unit
- sound=sound$unit
- mixer=mixer$unit
- audioctl=audioctl$unit
- rm -f $sound $audio $mixer $audioctl
- mknod $sound c $major $unit
- 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
- chmod 666 $audio $sound $mixer $audioctl
- [ -e audio ] || ln -s $audio audio
- [ -e mixer ] || ln -s $mixer mixer
- [ -e sound ] || ln -s $sound sound
- [ -e audioctl ] || ln -s $audioctl audioctl
+tun*)
+ M tun$U c 23 $U 600
;;
-crypto)
- rm -f crypto
- mknod crypto c 47 0 ; chmod 666 crypto
+bpf*)
+ M bpf$U c 22 $U 600
;;
apm*)
- rm -f apm apmctl
- mknod apm c 25 0
- mknod apmctl c 25 8
- chown root.wheel apm apmctl
- chmod 644 apm apmctl
+ M apm c 25 0 644
+ M apmctl c 25 8 644
;;
-usb*)
- rm -f usb$unit
- mknod usb$unit c 61 $unit
- chown root.wheel usb$unit
- chmod 660 usb$unit
+audio*)
+ M sound$U c 44 $U
+ M mixer$U c 44 $(($U+16))
+ M audio$U c 44 $(($U+128))
+ M audioctl$U c 44 $(($U+192))
+ MKlist="$MKlist;[ -e audio ] || ln -s audio$U audio"
+ MKlist="$MKlist;[ -e mixer ] || ln -s mixer$U mixer"
+ MKlist="$MKlist;[ -e sound ] || ln -s sound$U sound"
+ MKlist="$MKlist;[ -e audioctl ] || ln -s audioctl$U audioctl"
;;
-uhid*)
- rm -f uhid$unit
- mknod uhid$unit c 62 $unit
- chown root.wheel uhid$unit
- chmod 660 uhid$unit
+uscanner*)
+ M uscanner$U c 74 $U 660
+ ;;
+
+utty*)
+ M utty$U c 66 $U 660
+ ;;
+
+urio*)
+ M urio$U c 65 $U 660
+ ;;
+
+ulpt*)
+ M ulpt$U c 64 $U 660
;;
ugen*)
+ n=$(($U*16))
for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
do
- rm -f ugen$unit.$j
- mknod ugen$unit.$j c 63 $(( $unit * 16 + $j ))
- chown root.wheel ugen$unit.$j
- chmod 660 ugen$unit.$j
+ M ugen$U.$j c 63 $(($n+$j)) 660
done
;;
-ulpt*)
- rm -f ulpt$unit
- mknod ulpt$unit c 64 $unit
- chown root.wheel ulpt$unit
- chmod 660 ulpt$unit
+uhid*)
+ M uhid$U c 62 $U 660
;;
-urio*)
- rm -f urio$unit
- mknod urio$unit c 65 $unit
- chown root.wheel urio$unit
- chmod 660 urio$unit
+usb*)
+ [ "$i" = "usb" ] && u= || u=$U
+ M usb$u c 61 $U 660
;;
-uscanner*)
- rm -f uscanner$unit
- mknod uscanner$unit c 74 $unit
- chown root.wheel uscanner$unit
- chmod 660 uscanner$unit
+pty*)
+ case $U in
+ 0) off=0 name=p;;
+ 1) off=16 name=q;;
+ 2) off=32 name=r;;
+ 3) off=48 name=s;;
+# Note that telnetd, rlogind, and xterm (at least) only look at p-s.
+ 4) off=64 name=t;;
+ 5) off=80 name=u;;
+ 6) off=96 name=v;;
+ 7) off=112 name=w;;
+ 8) off=128 name=x;;
+ 9) off=144 name=y;;
+ 10) off=160 name=z;;
+ 11) off=176 name=P;;
+ 12) off=192 name=Q;;
+ 13) off=206 name=R;;
+ 14) off=224 name=S;;
+ 15) off=240 name=T;;
+ *) echo bad unit for pty in: $i; continue;;
+ esac
+ n=0
+ while [ $n -lt 16 ]
+ do
+ nam=$name$(hex $n)
+ M tty$nam c 4 $(($off+$n))
+ M pty$nam c 5 $(($off+$n))
+ n=$(($n+1))
+ done
;;
-utty*)
- rm -f utty$unit
- mknod utty$unit c 66 $unit
- chown root.wheel utty$unit
- chmod 660 utty$unit
+tty0*)
+ M tty$U c 7 $U 660 dialer uucp
+ M cua$U c 7 $(($U+128)) 660 dialer uucp
;;
-
-ttyCcfg)
- major=67
- minor=255
- rm -f ttyCcfg
- mknod ttyCcfg c $major $minor
- chown root.wheel ttyCcfg
- ;;
+wsmux|wsmouse|wskbd)
+ M wsmouse c 70 0 600
+ M wskbd c 70 1 600
+ ;;
-ttyC*)
- type=C
- unit=${i##ttyC}
- major=67
- minor=$unit
- rm -f tty$type$unit
- mknod tty$type$unit c $major $minor
- chown root.wheel tty$type$unit
- ;;
+wsmouse*)
+ M wsmouse$U c 69 $U 600
+ ;;
-bpf*)
- unit=${i##*[a-z]}
- rm -f bpf${unit}
- mknod bpf${unit} c 22 ${unit}
- chown root.wheel bpf${unit}
+wskbd*)
+ M wskbd$U c 68 $U 600
;;
-pf)
- rm -f pf
- mknod pf c 39 0
- chown root.wheel pf
- chmod 600 pf
+ttyC*)
+ U=${i##ttyC}
+ case $U in
+ [0-9a-f]) M ttyC$U c 67 $(( 16#$U )) 600;;
+ cfg) M ttyCcfg c 67 255 600;;
+ *) echo bad unit $U for $i; exit 1;;
+ esac
;;
-tun*)
- unit=${i##*[a-z]}
- rm -f tun$unit
- mknod tun$unit c 23 $unit
- chmod 600 tun$unit
- chown root.wheel tun$unit
+wscons)
+ R ttyCcfg
+ R ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5 ttyC6 ttyC7 ttyC8 ttyC9
+ R ttyCa ttyCb wsmux wskbd0 wskbd1 wskbd2 wskbd3
+ R wsmouse0 wsmouse1 wsmouse2 wsmouse3
;;
rd*)
- blk=17; chr=17;
- umask 2 ; unit=${i##*[a-z]}
- rm -f rd${unit}a rd${unit}c rrd${unit}a rrd${unit}c
- mknod rd${unit}a b ${blk} $(( $unit * 16 + 0 ))
- mknod rd${unit}c b ${blk} $(( $unit * 16 + 2 ))
- mknod rrd${unit}a c ${chr} $(( $unit * 16 + 0 ))
- mknod rrd${unit}c c ${chr} $(( $unit * 16 + 2 ))
- chown root.operator rd${unit}[ac] rrd${unit}[ac]
- chmod 640 rd${unit}[ac] rrd${unit}[ac]
- umask 77
+ dodisk2 rd $U 17 17 $U 0
;;
-lkm)
- rm -f lkm
- mknod lkm c 24 0
- chown root.kmem lkm
- chmod 640 lkm
+vnd*)
+ dodisk vnd $U 14 19 $U 0
+ dodisk svnd $U 14 19 $U 128
;;
-pci*)
- rm -f pci
- mknod pci c 71 0
- chown root.kmem pci
- chmod 664 pci
+ch*)
+ M ch$U c 10 $U 660 operator
;;
-random|srandom|urandom|prandom|arandom)
- rm -f random urandom srandom prandom arandom
- mknod random c 40 0
- mknod srandom c 40 1
- mknod urandom c 40 2
- mknod prandom c 40 3
- mknod arandom c 40 4
- chown root.wheel random srandom urandom prandom arandom
- chmod 644 random srandom urandom prandom arandom
- ;;
-uk*)
- unit=${i##*[a-z]}
- rm -f uk$unit
- mknod uk$unit c 41 $unit
- chown root.operator uk$unit
- chmod 640 uk$unit
+cd*)
+ dodisk2 cd $U 3 9 $U 0
;;
-ss*)
- unit=${i##*[a-z]}
- rm -f ss$unit
- mknod ss$unit c 42 $unit
- chown root.operator ss$unit
- chmod 440 ss$unit
-# backwards compatibility with older PINTs
- rm -f scan$unit
- ln -s ss$unit scan$unit
- ;;
-wscons)
- sh $this wskbd0 wskbd1 wskbd2 wskbd3
- sh $this wsmouse0 wsmouse1 wsmouse2 wsmouse3
- sh $this ttyCcfg
- sh $this wsmux
- ;;
-wsmux|wsmouse|wskbd)
- rm -f wsmouse wskbd
- mknod wsmouse c 70 0
- mknod wskbd c 70 1
- chown root.wheel wsmouse wskbd
- chmod 600 wsmouse wskbd
+st*)
+ n=$(($U*16))
+ for pre in " " n e en
+ do
+ M ${pre}st$U b 5 $n 660 operator
+ M ${pre}rst$U c 20 $n 660 operator
+ n=$(($n+1))
+ done
;;
-wskbd*)
- unit=${i##*[a-z]}
- rm -f wskbd${unit}
- mknod wskbd${unit} c 68 ${unit}
- # XXX
- chmod 660 wskbd${unit}
- chown root.wheel wskbd${unit}
- ;;
-wsmouse*)
- unit=${i##*[a-z]}
- rm -f wsmouse${unit}
- mknod wsmouse${unit} c 69 ${unit}
- # XXX
- chmod 660 wsmouse${unit}
- chown root.wheel wsmouse${unit}
+local)
+ test -s $T.local && sh $T.local
;;
-xfs*)
- rm -f xfs$unit
- mknod xfs$unit c 51 $unit
- chmod 600 xfs$unit
- chown root.wheel xfs$unit
+fd)
+ RMlist="mkdir -p fd;$RMlist" n=0
+ while [ $n -lt 64 ];do M fd/$n c 21 $n;n=$(($n+1));done
+ MKlist="$MKlist;chmod 555 fd"
;;
-altq)
- mkdir -p altq
- chmod 755 altq
- unit=0
- for dev in altq cbq wfq afm fifoq red rio localq hfsc \
- cdnr blue priq; do
- rm -f altq/$dev
- mknod altq/$dev c 72 $unit
- chmod 644 altq/$dev
- unit=$(($unit + 1))
- done
+all)
+ R std fd sd0 sd1 sd2 sd3 sd4 pty0 pty1 st0 st1 ch0 cd0 cd1
+ R vnd0 vnd1 vnd2 vnd3 ccd0 ccd1 ccd2 ccd3 wd0 wd1 wd2 wd3
+ R raid0 raid1 raid2 raid3 rd0
+ R bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9
+ R tun0 tun1 tun2 tun3 altq pf crypto apm
+ R tty00 tty01 tty02 tty03 lkm random uk0 uk1 ss0 ss1 xfs0
+ R audio0 usbs iop0 iop1 pci wscons local
;;
-local)
- umask 0
- test -s MAKEDEV.local && sh $this.local
+sd*|ccd*|raid*|wd*)
+ case $i in
+ sd*) dodisk sd $U 2 8 $U 0;;
+ ccd*) dodisk ccd $U 16 18 $U 0;;
+ raid*) dodisk raid $U 19 54 $U 0;;
+ wd*) dodisk wd $U 0 11 $U 0;;
+ esac
;;
*)
echo $i: unknown device
+ ;;
esac
done
-
+}
+R "$@"
+if [ "$os" = "SunOS" ]; then
+ eo=transform
+ transform() {
+ case $mode in
+ 600) mask=077;;
+ 640) mask=027;;
+ 660) mask=007;;
+ 644) mask=022;;
+ 666) mask=0;;
+ 440) mask=227;;
+ esac
+ echo `echo "$@"|sed \
+ 's/mknod -m \([0-9]*\) /umask '$mask';mknod /;s/-m [0-9]* //g;\
+ s/operator/5/g;s/root.kmem/root.2/g;s/root\./root:/g'`
+ }
+fi
+list="$RMlist"
+for mode in $modes; do
+ list="$list;${mklist[$mode]}"
+done
+for group in $groups; do
+ list="$list;${grplist[$group]}"
+done
+list="$list;$MKlist"
+if [ "$eo" = "echo" -o "$eo" = "transform" ]; then
+ $eo "$list"
+else
+ echo "$list" | sh
+fi
diff --git a/etc/etc.sparc64/MAKEDEV b/etc/etc.sparc64/MAKEDEV
index f9309dd2921..9efd3f155ff 100644
--- a/etc/etc.sparc64/MAKEDEV
+++ b/etc/etc.sparc64/MAKEDEV
@@ -4,10 +4,10 @@
# generated from:
#
# OpenBSD: etc.sparc64/MAKEDEV.md,v 1.4 2002/01/04 16:59:18 todd Exp
-# OpenBSD: MAKEDEV.mi,v 1.14 2002/01/08 03:26:04 todd Exp
+# OpenBSD: MAKEDEV.mi,v 1.15 2002/01/08 05:10:38 todd Exp
# OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp
#
-# $OpenBSD: MAKEDEV,v 1.36 2002/01/08 03:28:59 todd Exp $
+# $OpenBSD: MAKEDEV,v 1.37 2002/01/08 05:29:13 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.
diff --git a/etc/etc.sun3/MAKEDEV b/etc/etc.sun3/MAKEDEV
index ea6ab1fd5ba..cc9d54309b7 100644
--- a/etc/etc.sun3/MAKEDEV
+++ b/etc/etc.sun3/MAKEDEV
@@ -4,10 +4,10 @@
# generated from:
#
# OpenBSD: etc.sun3/MAKEDEV.md,v 1.1 2002/01/08 00:59:59 todd Exp
-# OpenBSD: MAKEDEV.mi,v 1.14 2002/01/08 03:26:04 todd Exp
+# OpenBSD: MAKEDEV.mi,v 1.15 2002/01/08 05:10:38 todd Exp
# OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp
#
-# $OpenBSD: MAKEDEV,v 1.40 2002/01/08 03:28:59 todd Exp $
+# $OpenBSD: MAKEDEV,v 1.41 2002/01/08 05:29:14 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.