2004-02-16 10:58:53 -08:00
|
|
|
define(COMM,`#')dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
include(MAKEDEV.sub)dnl
|
|
|
|
dnl
|
2016-09-10 20:06:31 -07:00
|
|
|
vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.83 2016/09/11 03:06:31 deraadt Exp $-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
divert(1)dnl
|
|
|
|
{-#-}
|
2004-02-14 09:24:30 -08:00
|
|
|
{-#-} Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-}
|
2003-06-18 11:08:59 -07:00
|
|
|
{-#-} Permission to use, copy, modify, and distribute this software for any
|
|
|
|
{-#-} purpose with or without fee is hereby granted, provided that the above
|
|
|
|
{-#-} copyright notice and this permission notice appear in all copies.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-}
|
2003-06-18 11:08:59 -07:00
|
|
|
{-#-} THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
{-#-} WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
{-#-} MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
{-#-} ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
{-#-} WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
{-#-} ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
{-#-} OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-}
|
2004-02-16 10:58:53 -08:00
|
|
|
define(quote,{-"$1" -})dnl
|
|
|
|
include(MAKEDEV.common)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2004-02-16 10:58:53 -08:00
|
|
|
__devtitle(make, {-Device "make" file. Valid arguments-})dnl
|
|
|
|
__devitem({-all-}, {-all-}, {-makes all known devices{-,-} including local devices.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-} Tries to make the ``standard'' number of each type.-})dnl
|
2004-02-16 10:58:53 -08:00
|
|
|
__devitem(std,{-std-},Standard devices)dnl
|
|
|
|
__devitem(local,local,Configuration specific devices)dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl _std
|
|
|
|
dnl
|
|
|
|
dnl $1: tty
|
|
|
|
dnl $2: memstuff
|
|
|
|
dnl $3: ksyms
|
2009-01-25 09:30:46 -08:00
|
|
|
dnl $4: klog
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2004-02-16 10:58:53 -08:00
|
|
|
define({-_std-},{-dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
std)
|
|
|
|
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 major_fdesc_c 0
|
|
|
|
M stdout c major_fdesc_c 1
|
|
|
|
M stderr c major_fdesc_c 2
|
|
|
|
M ksyms c $3 0 640 kmem
|
2009-01-25 09:30:46 -08:00
|
|
|
M klog c $4 0 600-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
divert(1)dnl
|
2004-02-16 10:58:53 -08:00
|
|
|
define(__mddivert,7)dnl
|
2008-06-14 16:09:05 -07:00
|
|
|
include(MAKEDEV.md)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
divert(0)dnl
|
|
|
|
#!/bin/sh -
|
|
|
|
#
|
|
|
|
# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
|
|
|
# generated from:
|
|
|
|
#
|
|
|
|
show_vers()dnl <-- now that all files are included, show versions
|
|
|
|
#
|
|
|
|
dnl
|
|
|
|
divert(2)dnl
|
|
|
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
|
|
T=$0
|
|
|
|
|
|
|
|
# set this to echo for Echo-Only debugging
|
|
|
|
[ "$eo" ] || eo=
|
|
|
|
|
|
|
|
hex()
|
|
|
|
{
|
|
|
|
case ${--}1 in
|
2002-02-10 13:52:30 -08:00
|
|
|
[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;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
}
|
2002-02-10 13:52:30 -08:00
|
|
|
|
2004-01-12 14:31:34 -08:00
|
|
|
alph2d()
|
|
|
|
{
|
2005-02-06 22:14:18 -08:00
|
|
|
local t="$1"
|
2004-01-12 14:31:34 -08:00
|
|
|
local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
|
|
local sub=${p%${t}*}
|
|
|
|
echo ${#sub}
|
|
|
|
}
|
|
|
|
|
2003-10-14 10:58:23 -07:00
|
|
|
h2d()
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{
|
2003-10-14 10:58:23 -07:00
|
|
|
local s="$1"
|
|
|
|
local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*}
|
|
|
|
|
|
|
|
echo $(($(_h2d $f)*16+ $(_h2d $n) ))
|
|
|
|
}
|
|
|
|
|
|
|
|
_h2d()
|
|
|
|
{
|
|
|
|
case $1 in
|
|
|
|
[0-9]) echo -n $1;;
|
|
|
|
a) echo -n 10;;
|
|
|
|
b) echo -n 11;;
|
|
|
|
c) echo -n 12;;
|
|
|
|
d) echo -n 13;;
|
|
|
|
e) echo -n 14;;
|
|
|
|
f) echo -n 15;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
}
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
unt()
|
|
|
|
{
|
|
|
|
# XXX pdksh can't seem to deal with locally scoped variables
|
|
|
|
# in ${foo#$bar} expansions
|
|
|
|
arg="{-$-}1"
|
|
|
|
tmp="${arg#[a-zA-Z]*}"
|
|
|
|
tmp="${tmp%*[a-zA-Z]}"
|
|
|
|
while [ "$tmp" != "$arg" ]
|
|
|
|
do
|
|
|
|
arg=$tmp
|
|
|
|
tmp="${arg#[a-zA-Z]*}"
|
|
|
|
tmp="${tmp%*[a-zA-Z]}"
|
|
|
|
done
|
|
|
|
echo $arg
|
|
|
|
}
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl dodisk(name, unit, blkmaj, chrmaj, unit, off[, stepping])
|
2002-01-06 22:25:32 -08:00
|
|
|
dnl arg: 1 2 3 4 5 6 7
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dodisk()
|
|
|
|
{
|
2002-02-13 20:37:15 -08:00
|
|
|
[ "$DEBUG" ] && set -x
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add(Mult(${5}, ${7:-16}), ${6}) count=0
|
2002-01-07 19:14:50 -08:00
|
|
|
[ 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
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
do
|
2005-10-04 11:33:52 -07:00
|
|
|
M {-$-}1{-$-}2$d b {-$-}3 Add($n, $count) 640 operator
|
2005-10-04 11:11:10 -07:00
|
|
|
M r{-$-}1{-$-}2$d c {-$-}4 Add($n, $count) 640 operator
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
let count=count+1
|
|
|
|
done
|
|
|
|
}
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl dodisk2(name, unit, blkmaj, chrmaj, unit, off[, stepping])
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl 1. name - prefix name of the device
|
|
|
|
dnl 2. unit - beginning unit number for block devices
|
|
|
|
dnl 3. blkmaj - block device major number
|
|
|
|
dnl 4. chrmaj - character device major number
|
|
|
|
dnl 5. unit - beginning unit number for character devices
|
2011-04-18 09:52:09 -07:00
|
|
|
dnl 6. off - offset from 0 for all minor numbers
|
2002-01-06 22:25:32 -08:00
|
|
|
dnl 7. step - optional, defaults to 16, number of partitions per device
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dodisk2()
|
|
|
|
{
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add(Mult({-$-}5, ${7:-16}), {-$-}6)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M {-$-}1{-$-}2a b {-$-}3 $n 640 operator
|
|
|
|
M r{-$-}1{-$-}2a c {-$-}4 $n 640 operator
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add($n, 2)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M {-$-}1{-$-}2c b {-$-}3 $n 640 operator
|
|
|
|
M r{-$-}1{-$-}2c c {-$-}4 $n 640 operator
|
|
|
|
}
|
|
|
|
|
|
|
|
# M name b/c major minor [mode] [group]
|
2005-10-05 23:43:19 -07:00
|
|
|
RMlist[0]="rm -f"
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
mkl() {
|
|
|
|
dnl
|
2016-03-12 09:58:59 -08:00
|
|
|
dnl multi mknod
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2016-03-12 09:58:59 -08:00
|
|
|
: {-$-}{mklist[0]:=";mknod"}
|
|
|
|
mklist[{-$-}{#mklist[*]}]=" -m {-$-}1 {-$-}2 {-$-}3 {-$-}4 {-$-}5"
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
}
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M() {
|
2005-10-05 23:43:19 -07:00
|
|
|
RMlist[{-$-}{#RMlist[*]}]={-$-}1
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
mkl ${5-666} {-$-}1 {-$-}2 {-$-}3 {-$-}4
|
|
|
|
G={-$-}{6:-wheel}
|
|
|
|
[ "{-$-}7" ] && {
|
2012-11-05 00:07:09 -08:00
|
|
|
MKlist[{-$-}{#MKlist[*]}]="&& chown {-$-}7:{-$-}G {-$-}1"
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
} || {
|
|
|
|
case $G in
|
2005-10-05 23:43:19 -07:00
|
|
|
wheel)
|
2012-11-05 00:07:09 -08:00
|
|
|
[ {-$-}{#whlist[*]} = 0 ] && whlist[0]="&& chgrp wheel"
|
2005-10-05 23:43:19 -07:00
|
|
|
whlist[{-$-}{#whlist[*]}]="$1"
|
|
|
|
;;
|
|
|
|
operator)
|
2012-11-05 00:07:09 -08:00
|
|
|
[ {-$-}{#oplist[*]} = 0 ] && oplist[0]="&& chgrp operator"
|
2005-10-05 23:43:19 -07:00
|
|
|
oplist[{-$-}{#oplist[*]}]="$1"
|
|
|
|
;;
|
|
|
|
*)
|
2012-11-05 00:07:09 -08:00
|
|
|
MKlist[{-$-}{#MKlist[*]}]="&& chgrp $G $1";
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
divert(7)dnl
|
|
|
|
dnl
|
|
|
|
dnl there is no blank line at the end of etc.arch/MAKEDEV.md files, so add one
|
|
|
|
dnl on the following line:
|
|
|
|
|
|
|
|
show_devs()dnl
|
|
|
|
dnl
|
|
|
|
divert(9)dnl
|
|
|
|
*)
|
|
|
|
echo $i: unknown device
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
|
|
|
_recurse "$@"
|
2005-10-05 23:43:19 -07:00
|
|
|
{
|
|
|
|
echo -n ${RMlist[*]}
|
|
|
|
echo -n ${mklist[*]}
|
|
|
|
echo -n ${MKlist[*]}
|
|
|
|
echo -n ${whlist[*]}
|
|
|
|
echo ${oplist[*]}
|
|
|
|
} | if [ "$eo" = "echo" ]; then
|
2016-09-10 20:06:31 -07:00
|
|
|
cat
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
else
|
2005-10-05 23:43:19 -07:00
|
|
|
sh
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
fi
|
2002-02-24 17:10:26 -08:00
|
|
|
divert(3)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
R() {
|
2002-02-08 12:26:36 -08:00
|
|
|
[ "$DEBUG" ] && set -x
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
for i in "$@"
|
|
|
|
do
|
|
|
|
U=`unt $i`
|
|
|
|
[ "$U" ] || U=0
|
|
|
|
|
|
|
|
case $i in
|
|
|
|
dnl
|