Browse Source

- fix a 'rndrandom' vs 'random' output problem

- more accurate documentation, more documentation
- remove some EOL whitespace
ok deraadt@
OPENBSD_3_1
todd 23 years ago
parent
commit
a8be8cd9de
1 changed files with 42 additions and 19 deletions
  1. +42
    -19
      src/etc/MAKEDEV.mi

+ 42
- 19
src/etc/MAKEDEV.mi View File

@ -1,6 +1,6 @@
include(MAKEDEV.sub)dnl
dnl
vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.40 2002/02/21 18:36:54 deraadt Exp $-})dnl
vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.41 2002/02/25 01:10:26 todd Exp $-})dnl
dnl
divert(1)dnl
{-#-}
@ -44,10 +44,12 @@ dnl Use '__devitem(uniqueid, name-pattern, description)' to create an entry
dnl in the description at the top of the generated MAKEDEV file:
dnl
dnl __devitem(sca, sca*, Sugar Generic device)dnl
dnl __devitem(cry, crypto, hardware crypto access driver)dnl
dnl
dnl This is ultimately shown as:
dnl
dnl # sca* Sugar Generic device
dnl # crypto hardware crypto access driver
dnl
dnl Use '_mkdev(uniqueid, shell-pattern, {-shell-script-})dnl' to create
dnl a shell script fragment used to 'create' the device (be sure to match
@ -55,35 +57,58 @@ dnl the uniqueid from above):
dnl
dnl _mkdev(sca, sca*, {-M sca$U c major_sca_c $U
dnl M rsca$U b major_sca_b Add($U, 128)-})dnl
dnl _mkdev(cry, crypto, {-M crypto c major_cry_c 0-})dnl
dnl
dnl This is ultimately expanded into:
dnl
dnl sca*) M sca$U c 24 $U
dnl M sca$U b 42 $(($U+128));;
dnl sca*)
dnl M sca$U c 24 $U
dnl M sca$U b 42 $(($U+128))
dnl ;;
dnl
dnl crypto)
dnl M crypto c 47 0
dnl ;;
dnl
dnl In the MAKEDEV.md file, add a '_DEV(uniqueid, charmajor, blockmajor)'
dnl entry:
dnl
dnl _DEV(sca, 24, 42)
dnl _DEV(cry, 47)
dnl
dnl Final step is to use the 'target/twrget' macros to have the 'all)' target
dnl generate one or more device(s). Usage of 'target/twrget' is:
dnl target(target_name, device_name [, append_string ] .. )
dnl twrget(target_name, uniqueid, device_name, [, append_string ] .. )
dnl
dnl target_name a unique name that later is used as an argument to
dnl 'show_target()' (which expands all devices for a
dnl given 'target_name').
dnl uniqueid same as 'uniqueid' above
dnl device_name string representing the device to be mknod'ed
dnl append_string for each append_string, `device_name' is prepended
dnl
dnl Final step is to add an entry to the 'all' entry below. For a short
dnl example:
dnl Note: 'target(a,b,c)' is equivalent to 'twrget(a,b,b,c)'
dnl
dnl _mkdev({-all-}, {-all-}, {-dnl
dnl _dl({-std-}, {-std-}, {-sca-}, {-sca0 sca1 sca2 sca3-})-})dnl
dnl
dnl For a short example:
dnl
dnl target(all, std)dnl
dnl target(all, sca, 0, 1, 2, 3)dnl
dnl twrget(all, cry, crypto)dnl
dnl
dnl would expand to:
dnl
dnl all)
dnl R std sca0 sca1 sca2 sca3
dnl R std sca0 sca1 sca2 sca3 crypto
dnl ;;
dnl
dnl presuming '_DEV(sca..' and '_DEV(std)' were in the MAKEDEV.md file.
dnl presuming '_DEV(sca, ?, ?)' and '_DEV(std)' were in the MAKEDEV.md file.
dnl
dnl
dnl Everything is 'automatically' added to 'MAKEDEV' based on whether or
dnl not the '_DEV()' entry has a corresponding _mkdev() and __devitem()
dnl entry in MAKEDEV.sub (this file).
dnl entry in MAKEDEV.mi (this file).
dnl
dnl Note: be very wary of adding whitespace, carriage returns, or not
dnl finishing a macro with ')dnl' .. otherwise, extra blank lines show up
@ -99,6 +124,9 @@ dnl target(ramd,rd,0)
dnl disk_q(rd)
dnl __devitem(rd, {-rd*-}, {-rd-})dnl
dnl
dnl Note: not all disks are generated in 'all)'. (e.g. vax has a lot of
dnl disks that are not generated by 'all)')
dnl
dnl
_mkdev(loc, local, {-test -s $T.local && sh $T.local-})dnl
dnl
@ -107,11 +135,6 @@ __devitem({-all-}, {-all-},
{-makes all known devices{-,-} including local devices.
{-#-} Tries to make the ``standard'' number of each type.-})dnl
dnl
dnl 'all' is special. The 'D'evice 'L'ist (or _dl) macro checks to see if
dnl a particular devices is in the MAKEDEV.md file, and if so, includes the
dnl necessary devices. Otherwise the devices are not included in the 'all'
dnl target. Note this keeps line lengths to less than column 70. For the
dnl gory details see the definition of '_dl' in MAKEDEV.sub
dnl
target(all, mcd, 0)dnl
twrget(all, fdesc, fd)dnl
@ -149,7 +172,7 @@ twrget(all, mmcl, mmclock)dnl
target(all, lpt, 0, 1, 2)dnl
twrget(all, lpt, lpa, 0, 1, 2)dnl
target(all, joy, 0, 1)dnl
target(all, rnd, random)dnl
twrget(all, rnd, random)dnl
target(all, uk, 0)dnl
target(all, st, 0)dnl
target(all, wt, 0)dnl
@ -369,7 +392,7 @@ _mkdev(s64_czs, cua[a-z], {-u=${i#cua*}
b) n=1 ;;
c) n=2 ;;
d) n=3 ;;
*) echo unknown cua device $i ;;
*) echo unknown cua device $i ;;
esac
M cua$u c major_s64_czs_c Add($n, 128) 660 dialer uucp-})dnl
-})dnl
@ -928,7 +951,7 @@ _mkdev(czs, cua[a-z], {-u=${i#cua*}
b) n=1 ;;
c) n=4 ;;
d) n=5 ;;
*) echo unknown cua device $i ;;
*) echo unknown cua device $i ;;
esac
M cua$u c major_czs_c Add($n, 128) 660 dialer uucp-})dnl
__devitem(arm_tty, tty*, {-alias for PC COM ports{-,-} this is what the system really wants-})dnl
@ -1287,7 +1310,7 @@ if [ "$eo" = "echo" -o "$eo" = "transform" ]; then
else
echo "$list" | sh
fi
divert(3)dnl
divert(3)dnl
dnl
R() {


Loading…
Cancel
Save