=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/etc/MAKEDEV.mi,v retrieving revision 1.40 retrieving revision 1.41 diff -c -r1.40 -r1.41 *** src/etc/MAKEDEV.mi 2002/02/21 18:36:54 1.40 --- src/etc/MAKEDEV.mi 2002/02/25 01:10:26 1.41 *************** *** 1,6 **** include(MAKEDEV.sub)dnl dnl ! vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.40 2002/02/21 18:36:54 deraadt Exp $-})dnl dnl divert(1)dnl {-#-} --- 1,6 ---- include(MAKEDEV.sub)dnl dnl ! vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.41 2002/02/25 01:10:26 todd Exp $-})dnl dnl divert(1)dnl {-#-} *************** *** 44,53 **** --- 44,55 ---- 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,89 **** 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 dnl This is ultimately expanded into: dnl ! dnl sca*) M sca$U c 24 $U ! dnl M sca$U b 42 $(($U+128));; dnl dnl In the MAKEDEV.md file, add a '_DEV(uniqueid, charmajor, blockmajor)' dnl entry: dnl dnl _DEV(sca, 24, 42) dnl ! dnl Final step is to add an entry to the 'all' entry below. For a short ! dnl example: dnl ! dnl _mkdev({-all-}, {-all-}, {-dnl ! dnl _dl({-std-}, {-std-}, {-sca-}, {-sca0 sca1 sca2 sca3-})-})dnl dnl dnl would expand to: dnl dnl all) ! dnl R std sca0 sca1 sca2 sca3 dnl ;; dnl ! 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 dnl Note: be very wary of adding whitespace, carriage returns, or not dnl finishing a macro with ')dnl' .. otherwise, extra blank lines show up --- 57,114 ---- 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*) ! 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 Note: 'target(a,b,c)' is equivalent to 'twrget(a,b,b,c)' + 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 crypto dnl ;; dnl ! 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.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,105 **** --- 124,133 ---- 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 __devtitle(make, Device "make" file. Valid arguments)dnl *************** *** 107,117 **** {-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 --- 135,140 ---- *************** *** 149,155 **** 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 target(all, uk, 0)dnl target(all, st, 0)dnl target(all, wt, 0)dnl --- 172,178 ---- target(all, lpt, 0, 1, 2)dnl twrget(all, lpt, lpa, 0, 1, 2)dnl target(all, joy, 0, 1)dnl ! twrget(all, rnd, random)dnl target(all, uk, 0)dnl target(all, st, 0)dnl target(all, wt, 0)dnl *************** *** 369,375 **** b) n=1 ;; c) n=2 ;; d) n=3 ;; ! *) echo unknown cua device $i ;; esac M cua$u c major_s64_czs_c Add($n, 128) 660 dialer uucp-})dnl -})dnl --- 392,398 ---- b) n=1 ;; c) n=2 ;; d) n=3 ;; ! *) echo unknown cua device $i ;; esac M cua$u c major_s64_czs_c Add($n, 128) 660 dialer uucp-})dnl -})dnl *************** *** 928,934 **** b) n=1 ;; c) n=4 ;; d) n=5 ;; ! *) 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 --- 951,957 ---- b) n=1 ;; c) n=4 ;; d) n=5 ;; ! *) 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,1293 **** else echo "$list" | sh fi ! divert(3)dnl dnl R() { --- 1310,1316 ---- else echo "$list" | sh fi ! divert(3)dnl dnl R() {