summaryrefslogtreecommitdiff
path: root/etc/etc.sun3/MAKEDEV
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2002-02-14 04:39:57 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2002-02-14 04:39:57 +0000
commit27892773eebc23d9cf6e06ee627a1ce15f7627b3 (patch)
tree9ebd6969cb711677c3a6c6ee8fbb0ea18d74b9ff /etc/etc.sun3/MAKEDEV
parentde556aeb0b5dffd9bdc973f3f00bdd9906f26ecf (diff)
sync
Diffstat (limited to 'etc/etc.sun3/MAKEDEV')
-rw-r--r--etc/etc.sun3/MAKEDEV43
1 files changed, 25 insertions, 18 deletions
diff --git a/etc/etc.sun3/MAKEDEV b/etc/etc.sun3/MAKEDEV
index 407fc3d5937..a0f88fb14d3 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.24 2002/02/09 16:59:50 deraadt Exp
+# OpenBSD: MAKEDEV.mi,v 1.27 2002/02/14 04:37:15 todd Exp
# OpenBSD: MAKEDEV.sub,v 1.5 2002/01/23 06:02:19 todd Exp
#
-# $OpenBSD: MAKEDEV,v 1.46 2002/02/09 17:01:41 deraadt Exp $
+# $OpenBSD: MAKEDEV,v 1.47 2002/02/14 04:39:56 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.
@@ -78,15 +78,16 @@ T=$0
hex()
{
case $1 in
- [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;;
+ [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
}
+
trunc()
{
# XXX pdksh can't seem to deal with locally scoped variables
@@ -98,6 +99,7 @@ trunc()
r|*) echo ${arg1#$arg2} ;;
esac
}
+
unt()
{
# XXX pdksh can't seem to deal with locally scoped variables
@@ -113,8 +115,10 @@ unt()
done
echo $arg
}
+
dodisk()
{
+ [ "$DEBUG" ] && set -x
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"
@@ -126,6 +130,7 @@ dodisk()
done
MKlist="$MKlist;chown root.operator $1$2? r$1$2?"
}
+
dodisk2()
{
n=$(($(($5*${7:-16}))+$6))
@@ -139,14 +144,16 @@ dodisk2()
# 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"
- }
+ [ "${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
@@ -167,6 +174,7 @@ M() {
}
return 0
}
+
R() {
[ "$DEBUG" ] && set -x
for i in "$@"
@@ -274,7 +282,6 @@ pty*)
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;;
@@ -370,8 +377,8 @@ if [ "$os" = "SunOS" ]; then
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'`
+ '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"