Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

676 lines
13 KiB

22 years ago
4 years ago
7 years ago
14 years ago
22 years ago
20 years ago
21 years ago
21 years ago
23 years ago
20 years ago
20 years ago
20 years ago
13 years ago
19 years ago
13 years ago
11 years ago
20 years ago
20 years ago
13 years ago
20 years ago
22 years ago
19 years ago
13 years ago
20 years ago
22 years ago
22 years ago
20 years ago
13 years ago
20 years ago
22 years ago
4 years ago
22 years ago
20 years ago
20 years ago
17 years ago
13 years ago
11 years ago
18 years ago
4 years ago
11 years ago
20 years ago
20 years ago
17 years ago
20 years ago
13 years ago
13 years ago
20 years ago
20 years ago
20 years ago
15 years ago
15 years ago
11 years ago
7 years ago
22 years ago
22 years ago
19 years ago
20 years ago
20 years ago
22 years ago
22 years ago
22 years ago
22 years ago
22 years ago
18 years ago
18 years ago
22 years ago
22 years ago
18 years ago
22 years ago
22 years ago
18 years ago
11 years ago
18 years ago
11 years ago
18 years ago
11 years ago
18 years ago
11 years ago
22 years ago
22 years ago
22 years ago
22 years ago
22 years ago
22 years ago
9 years ago
15 years ago
4 years ago
23 years ago
22 years ago
7 years ago
11 years ago
11 years ago
15 years ago
16 years ago
7 years ago
16 years ago
22 years ago
20 years ago
22 years ago
20 years ago
6 years ago
20 years ago
13 years ago
4 years ago
13 years ago
13 years ago
20 years ago
17 years ago
17 years ago
20 years ago
20 years ago
11 years ago
4 years ago
20 years ago
18 years ago
20 years ago
18 years ago
22 years ago
11 years ago
10 years ago
5 years ago
11 years ago
13 years ago
22 years ago
17 years ago
22 years ago
4 years ago
22 years ago
20 years ago
4 years ago
22 years ago
4 years ago
22 years ago
4 years ago
20 years ago
4 years ago
20 years ago
22 years ago
19 years ago
22 years ago
4 years ago
22 years ago
13 years ago
10 years ago
4 years ago
13 years ago
20 years ago
7 years ago
22 years ago
22 years ago
19 years ago
14 years ago
20 years ago
14 years ago
20 years ago
13 years ago
5 years ago
13 years ago
20 years ago
20 years ago
19 years ago
20 years ago
22 years ago
22 years ago
22 years ago
20 years ago
22 years ago
15 years ago
20 years ago
7 years ago
22 years ago
13 years ago
7 years ago
13 years ago
7 years ago
13 years ago
19 years ago
7 years ago
19 years ago
13 years ago
13 years ago
7 years ago
13 years ago
22 years ago
20 years ago
22 years ago
20 years ago
7 years ago
22 years ago
20 years ago
22 years ago
20 years ago
22 years ago
20 years ago
22 years ago
22 years ago
17 years ago
22 years ago
17 years ago
22 years ago
20 years ago
22 years ago
11 years ago
7 years ago
4 years ago
22 years ago
12 years ago
22 years ago
22 years ago
22 years ago
22 years ago
18 years ago
7 years ago
18 years ago
  1. #!/bin/sh -
  2. #
  3. # THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
  4. # generated from:
  5. #
  6. # OpenBSD: etc.sparc64/MAKEDEV.md,v 1.91 2020/01/23 02:47:29 dlg Exp
  7. # OpenBSD: MAKEDEV.common,v 1.110 2020/04/18 21:28:35 ratchov Exp
  8. # OpenBSD: MAKEDEV.mi,v 1.83 2016/09/11 03:06:31 deraadt Exp
  9. # OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp
  10. #
  11. #
  12. # Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
  13. #
  14. # Permission to use, copy, modify, and distribute this software for any
  15. # purpose with or without fee is hereby granted, provided that the above
  16. # copyright notice and this permission notice appear in all copies.
  17. #
  18. # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  19. # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  20. # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  21. # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  22. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  23. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  24. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  25. #
  26. # Device "make" file. Valid arguments:
  27. # all makes all known devices, including local devices.
  28. # Tries to make the ``standard'' number of each type.
  29. # ramdisk Ramdisk kernel devices
  30. # std Standard devices
  31. # local Configuration specific devices
  32. # Disks:
  33. # cd* ATAPI and SCSI CD-ROM drives
  34. # fd* Floppy disk drives (3 1/2", 5 1/4")
  35. # rd* "rd" pseudo-disks
  36. # sd* SCSI disks, including flopticals
  37. # vnd* "file" pseudo-disk devices
  38. # wd* "winchester" disk drives (ST506, IDE, ESDI, RLL, ...)
  39. # Tapes:
  40. # ch* SCSI media changers
  41. # st* SCSI tape drives
  42. # Terminal ports:
  43. # cua[a-z]* Zilog 8530 serial port
  44. # magma* Magma multiport cards
  45. # spif* "spif" multiport cards
  46. # tty[0-7][0-9a-f] NS16x50 serial ports
  47. # tty[a-z]* Zilog 8530 serial port
  48. # ttyh* Sab82532 serial devices
  49. # ttyV* Virtual console concentrator
  50. # Pseudo terminals:
  51. # ptm pty master device
  52. # pty* Set of 62 master pseudo terminals
  53. # tty* Set of 62 slave pseudo terminals
  54. # Console ports:
  55. # console PROM console
  56. # ttyC-J* wscons display devices
  57. # wscons Minimal wscons devices
  58. # wskbd* wscons keyboards
  59. # wsmux wscons keyboard/mouse mux devices
  60. # Pointing devices:
  61. # wsmouse* wscons mice
  62. # Printers:
  63. # bpp* Parallel port
  64. # bpp[jkl] "spif" parallel port
  65. # bppmag[mno] Magma parallel port
  66. # lpa* Polled printer port
  67. # lpt* IEEE 1284 centronics printer
  68. # USB devices:
  69. # ttyU* USB serial ports
  70. # uall All USB devices
  71. # ugen* Generic USB devices
  72. # uhid* Generic HID devices
  73. # fido fido/* nodes
  74. # ulpt* Printer devices
  75. # usb* Bus control devices used by usbd for attach/detach
  76. # Special purpose devices:
  77. # audio* Audio devices
  78. # bio ioctl tunnel pseudo-device
  79. # bpf Berkeley Packet Filter
  80. # diskmap Disk mapper
  81. # drm* Direct Rendering Manager
  82. # fd fd/* nodes
  83. # dt Dynamic Tracer
  84. # fuse Userland Filesystem
  85. # hotplug devices hot plugging
  86. # openprom PROM settings
  87. # pci* PCI bus devices
  88. # pf* Packet Filter
  89. # pppx* PPP Multiplexer
  90. # pppac* PPP Access Concentrator
  91. # rmidi* Raw MIDI devices
  92. # *random In-kernel random data source
  93. # tun* Network tunnel driver
  94. # tap* Ethernet tunnel driver
  95. # uk* Unknown SCSI devices
  96. # uperf Performance counters
  97. # video* Video V4L2 devices
  98. # vscsi* Virtual SCSI controller
  99. # hvctl Hypervisor control channel
  100. # spds Service processor domain services channel
  101. # ldom* Logical domain services channels
  102. # vdsp* Virtual disk server ports
  103. # switch* Switch driver
  104. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  105. T=$0
  106. # set this to echo for Echo-Only debugging
  107. [ "$eo" ] || eo=
  108. hex()
  109. {
  110. case $1 in
  111. [0-9]) echo -n $1;;
  112. 10) echo -n a;;
  113. 11) echo -n b;;
  114. 12) echo -n c;;
  115. 13) echo -n d;;
  116. 14) echo -n e;;
  117. 15) echo -n f;;
  118. esac
  119. }
  120. alph2d()
  121. {
  122. local t="$1"
  123. local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  124. local sub=${p%${t}*}
  125. echo ${#sub}
  126. }
  127. h2d()
  128. {
  129. local s="$1"
  130. local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*}
  131. echo $(($(_h2d $f)*16+ $(_h2d $n) ))
  132. }
  133. _h2d()
  134. {
  135. case $1 in
  136. [0-9]) echo -n $1;;
  137. a) echo -n 10;;
  138. b) echo -n 11;;
  139. c) echo -n 12;;
  140. d) echo -n 13;;
  141. e) echo -n 14;;
  142. f) echo -n 15;;
  143. esac
  144. }
  145. unt()
  146. {
  147. # XXX pdksh can't seem to deal with locally scoped variables
  148. # in ${foo#$bar} expansions
  149. arg="$1"
  150. tmp="${arg#[a-zA-Z]*}"
  151. tmp="${tmp%*[a-zA-Z]}"
  152. while [ "$tmp" != "$arg" ]
  153. do
  154. arg=$tmp
  155. tmp="${arg#[a-zA-Z]*}"
  156. tmp="${tmp%*[a-zA-Z]}"
  157. done
  158. echo $arg
  159. }
  160. dodisk()
  161. {
  162. [ "$DEBUG" ] && set -x
  163. n=$(($((${5}*${7:-16}))+${6})) count=0
  164. [ 0$7 -ne 8 ] && l="i j k l m n o p"
  165. for d in a b c d e f g h $l
  166. do
  167. M $1$2$d b $3 $(($n+$count)) 640 operator
  168. M r$1$2$d c $4 $(($n+$count)) 640 operator
  169. let count=count+1
  170. done
  171. }
  172. dodisk2()
  173. {
  174. n=$(($(($5*${7:-16}))+$6))
  175. M $1$2a b $3 $n 640 operator
  176. M r$1$2a c $4 $n 640 operator
  177. n=$(($n+2))
  178. M $1$2c b $3 $n 640 operator
  179. M r$1$2c c $4 $n 640 operator
  180. }
  181. # M name b/c major minor [mode] [group]
  182. RMlist[0]="rm -f"
  183. mkl() {
  184. : ${mklist[0]:=";mknod"}
  185. mklist[${#mklist[*]}]=" -m $1 $2 $3 $4 $5"
  186. }
  187. M() {
  188. RMlist[${#RMlist[*]}]=$1
  189. mkl ${5-666} $1 $2 $3 $4
  190. G=${6:-wheel}
  191. [ "$7" ] && {
  192. MKlist[${#MKlist[*]}]="&& chown $7:$G $1"
  193. } || {
  194. case $G in
  195. wheel)
  196. [ ${#whlist[*]} = 0 ] && whlist[0]="&& chgrp wheel"
  197. whlist[${#whlist[*]}]="$1"
  198. ;;
  199. operator)
  200. [ ${#oplist[*]} = 0 ] && oplist[0]="&& chgrp operator"
  201. oplist[${#oplist[*]}]="$1"
  202. ;;
  203. *)
  204. MKlist[${#MKlist[*]}]="&& chgrp $G $1";
  205. esac
  206. }
  207. return 0
  208. }
  209. R() {
  210. [ "$DEBUG" ] && set -x
  211. for i in "$@"
  212. do
  213. U=`unt $i`
  214. [ "$U" ] || U=0
  215. case $i in
  216. ramdisk)
  217. R std fd0 wd0 wd1 wd2 sd0 sd1 sd2 rd0
  218. R st0 cd0 bpf bio diskmap random
  219. ;;
  220. std)
  221. M console c 0 0 600
  222. M tty c 2 0
  223. M mem c 3 0 640 kmem
  224. M kmem c 3 1 640 kmem
  225. M null c 3 2
  226. M zero c 3 12
  227. M stdin c 24 0
  228. M stdout c 24 1
  229. M stderr c 24 2
  230. M ksyms c 76 0 640 kmem
  231. M klog c 16 0 600
  232. M openprom c 70 0 600
  233. M mdesc c 70 1 640 kmem
  234. M pri c 70 2 640 kmem
  235. ;;
  236. switch*)
  237. M switch$U c 136 $U 600
  238. ;;
  239. vdsp*)
  240. M vdsp$U c 133 $U 600
  241. ;;
  242. ldom*)
  243. M ldom$U c 132 $(($U+32)) 600
  244. ;;
  245. spds)
  246. M spds c 132 1 600
  247. ;;
  248. hvctl)
  249. M hvctl c 132 0 600
  250. ;;
  251. vscsi*)
  252. M vscsi$U c 128 $U 600
  253. ;;
  254. video*)
  255. M video$U c 44 $U 600
  256. MKlist[${#MKlist[*]}]=";[ -e video ] || ln -s video$U video"
  257. ;;
  258. uperf)
  259. M uperf c 25 0 664
  260. ;;
  261. uk*)
  262. M uk$U c 60 $U 640 operator
  263. ;;
  264. tap*)
  265. M tap$U c 135 $U 600
  266. ;;
  267. tun*)
  268. M tun$U c 111 $U 600
  269. ;;
  270. *random)
  271. M urandom c 119 0 644
  272. RMlist[${#RMlist[*]}]=random
  273. MKlist[${#MKlist[*]}]=";ln -s urandom random"
  274. ;;
  275. rmidi*)
  276. M rmidi$U c 68 $U 660 _sndiop
  277. ;;
  278. pppac*)
  279. M pppac$U c 138 $U 600
  280. ;;
  281. pppx*)
  282. M pppx$U c 131 $U 600
  283. ;;
  284. pf*)
  285. M pf c 73 0 600
  286. ;;
  287. pci*)
  288. M pci$U c 52 $U 600
  289. MKlist[${#MKlist[*]}]=";[ -h pci ] || ln -sf pci0 pci"
  290. ;;
  291. openprom)
  292. M openprom c 70 0
  293. ;;
  294. hotplug)
  295. M hotplug c 124 $U 400
  296. ;;
  297. fuse)
  298. M fuse$U c 134 $U 600
  299. ;;
  300. dt)
  301. M dt c 30 0 600
  302. ;;
  303. fd)
  304. RMlist[${#RMlist[*]}]=";mkdir -p fd;rm -f" n=0
  305. while [ $n -lt 64 ];do M fd/$n c 24 $n;n=$(($n+1));done
  306. MKlist[${#MKlist[*]}]=";chmod 555 fd"
  307. ;;
  308. drm*)
  309. M drm$U c 87 $U 600
  310. r=$(($U+128))
  311. M drmR$r c 87 $r 600
  312. ;;
  313. diskmap)
  314. M diskmap c 130 0 640 operator
  315. ;;
  316. bpf)
  317. M bpf c 105 0 600
  318. M bpf0 c 105 0 600
  319. ;;
  320. bio)
  321. M bio c 120 0 600
  322. ;;
  323. audio*)
  324. M audio$U c 69 $U 660 _sndiop
  325. M audioctl$U c 69 $(($U+192)) 660 _sndiop
  326. ;;
  327. usb*)
  328. [ "$i" = "usb" ] && u= || u=$U
  329. M usb$u c 90 $U 640
  330. ;;
  331. ulpt*)
  332. M ulpt$U c 93 $U 600
  333. ;;
  334. fido)
  335. RMlist[${#RMlist[*]}]=";mkdir -p fido;rm -f" n=0
  336. while [ $n -lt 4 ];do M fido/$n c 137 $n 666;n=$(($n+1));done
  337. MKlist[${#MKlist[*]}]=";chmod 555 fido"
  338. ;;
  339. uhid*)
  340. M uhid$U c 91 $U 600
  341. ;;
  342. ugen*)
  343. n=$(($U*16))
  344. for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5}
  345. do
  346. M ugen$U.$j c 92 $(($n+10#$j)) 600
  347. done
  348. ;;
  349. uall)
  350. R ttyU0 ttyU1 ttyU2 ttyU3 ugen0 ugen1 ugen2 ugen3 ugen4 ugen5
  351. R ugen6 ugen7 ulpt0 ulpt1 fido uhid0 uhid1 uhid2 uhid3 uhid4
  352. R uhid5 uhid6 uhid7 usb0 usb1 usb2 usb3 usb4 usb5 usb6 usb7
  353. ;;
  354. ttyU[0-9a-zA-Z])
  355. U=${i#ttyU*}
  356. o=$(alph2d $U)
  357. M ttyU$U c 95 $o 660 dialer root
  358. M cuaU$U c 95 $(($o+128)) 660 dialer root
  359. ;;
  360. lpt*|lpa*)
  361. case $i in
  362. lpt*) n=lpt f=0;;
  363. lpa*) n=lpa f=128;;
  364. esac
  365. M $n$U c 37 $(($U+$f)) 600
  366. ;;
  367. bpp*)
  368. M bpp$U c 107 $U 600
  369. ;;
  370. wsmouse[0-9]*)
  371. M wsmouse$U c 80 $U 600
  372. ;;
  373. wsmux|wsmouse|wskbd)
  374. M wsmouse c 81 0 600
  375. M wskbd c 81 1 600
  376. ;;
  377. wskbd[0-9]*)
  378. M wskbd$U c 79 $U 600
  379. ;;
  380. wscons)
  381. R wsmouse0 wsmouse1 wsmouse2 wsmouse3 wsmouse4 wsmouse5
  382. R wsmouse6 wsmouse7 wsmouse8 wsmouse9 wskbd0 wskbd1 wskbd2
  383. R wskbd3 wsmux ttyJcfg ttyJ0 ttyJ1 ttyJ2 ttyJ3 ttyJ4 ttyJ5
  384. R ttyJ6 ttyJ7 ttyJ8 ttyJ9 ttyJa ttyJb ttyIcfg ttyI0 ttyI1
  385. R ttyI2 ttyI3 ttyI4 ttyI5 ttyI6 ttyI7 ttyI8 ttyI9 ttyIa ttyIb
  386. R ttyHcfg ttyH0 ttyH1 ttyH2 ttyH3 ttyH4 ttyH5 ttyH6 ttyH7
  387. R ttyH8 ttyH9 ttyHa ttyHb ttyGcfg ttyG0 ttyG1 ttyG2 ttyG3
  388. R ttyG4 ttyG5 ttyG6 ttyG7 ttyG8 ttyG9 ttyGa ttyGb ttyFcfg
  389. R ttyF0 ttyF1 ttyF2 ttyF3 ttyF4 ttyF5 ttyF6 ttyF7 ttyF8 ttyF9
  390. R ttyFa ttyFb ttyEcfg ttyE0 ttyE1 ttyE2 ttyE3 ttyE4 ttyE5
  391. R ttyE6 ttyE7 ttyE8 ttyE9 ttyEa ttyEb ttyDcfg ttyD0 ttyD1
  392. R ttyD2 ttyD3 ttyD4 ttyD5 ttyD6 ttyD7 ttyD8 ttyD9 ttyDa ttyDb
  393. R ttyCcfg ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5 ttyC6 ttyC7
  394. R ttyC8 ttyC9 ttyCa ttyCb
  395. ;;
  396. tty[C-J]*)
  397. U=${i##tty[C-J]}
  398. case $i in
  399. ttyC*) n=C m=0;;
  400. ttyD*) n=D m=256;;
  401. ttyE*) n=E m=512;;
  402. ttyF*) n=F m=768;;
  403. ttyG*) n=G m=1024;;
  404. ttyH*) n=H m=1280;;
  405. ttyI*) n=I m=1536;;
  406. ttyJ*) n=J m=1792;;
  407. esac
  408. case $U in
  409. [0-9a-f]) M tty$n$U c 78 $((16#$U+$m)) 600;;
  410. cfg) M tty${n}cfg c 78 $((255+$m)) 600;;
  411. *) echo bad unit $U for $i; exit 1;;
  412. esac
  413. ;;
  414. pty*)
  415. if [ $U -gt 15 ]; then
  416. echo bad unit for pty in: $i
  417. continue
  418. fi
  419. set -A letters p q r s t u v w x y z P Q R S T
  420. set -A suffixes 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q \
  421. r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X \
  422. Y Z
  423. name=${letters[$U]}
  424. n=0
  425. while [ $n -lt 62 ]
  426. do
  427. nam=$name${suffixes[$n]}
  428. off=$(($U*62))
  429. M tty$nam c 20 $(($off+$n))
  430. M pty$nam c 21 $(($off+$n))
  431. n=$(($n+1))
  432. done
  433. ;;
  434. ptm)
  435. M ptm c 123 0 666
  436. ;;
  437. ttyV[0-9a-zA-Z])
  438. U=${i#ttyV*}
  439. o=$(alph2d $U)
  440. M ttyV$U c 127 $o 600
  441. ;;
  442. ttyh*)
  443. M ttyh$U c 77 $U 660 dialer root
  444. ;;
  445. tty[a-z])
  446. u=${i#tty*}
  447. case $u in
  448. a) n=0 ;;
  449. b) n=1 ;;
  450. c) n=2 ;;
  451. d) n=3 ;;
  452. *) echo unknown tty device $i ;;
  453. esac
  454. M tty$u c 12 $n 660 dialer root
  455. ;;
  456. tty[0-7][0-9a-f])
  457. U=${i#tty*}
  458. o=$(h2d $U)
  459. M tty$U c 36 $o 660 dialer root
  460. M cua$U c 36 $(($o+128)) 660 dialer root
  461. ;;
  462. spif*)
  463. case $U in
  464. 0) offset=0 nam=j;;
  465. 1) offset=16 nam=k;;
  466. 2) offset=32 nam=l;;
  467. *) echo "bad unit for $i: $U"; exit 127;;
  468. esac
  469. offset=$(($U*64))
  470. n=0
  471. while [ $n -lt 8 ]
  472. do
  473. name=${nam}`hex $n`
  474. M tty$name c 108 $(($offset+$n)) 660 dialer root
  475. n=$(($n+1))
  476. done
  477. M bpp${nam}0 c 109 $(($offset+0)) 600
  478. ;;
  479. magma*)
  480. case $U in
  481. 0) offset=0 nam=m;;
  482. 1) offset=16 nam=n;;
  483. 2) offset=32 nam=o;;
  484. *) echo "bad unit for $i: $U"; exit 127;;
  485. esac
  486. offset=$(($U*64))
  487. n=0
  488. while [ $n -lt 16 ]
  489. do
  490. name=${nam}`hex $n`
  491. M tty$name c 71 $(($offset+$n)) 660 dialer root
  492. n=$(($n+1))
  493. done
  494. M bpp${nam}0 c 72 $(($offset+0)) 600
  495. M bpp${nam}1 c 72 $(($offset+1)) 600
  496. ;;
  497. cua[a-z])
  498. u=${i#cua*}
  499. case $u in
  500. a) n=0 ;;
  501. b) n=1 ;;
  502. c) n=2 ;;
  503. d) n=3 ;;
  504. *) echo unknown cua device $i ;;
  505. esac
  506. M cua$u c 12 $(($n+128)) 660 dialer root
  507. ;;
  508. st*)
  509. n=$(($U*16))
  510. for pre in " " n e en
  511. do
  512. M ${pre}rst$U c 18 $n 660 operator
  513. n=$(($n+1))
  514. done
  515. ;;
  516. ch*)
  517. M ch$U c 19 $U 660 operator
  518. ;;
  519. vnd*)
  520. dodisk vnd $U 8 110 $U 0
  521. ;;
  522. rd*)
  523. dodisk2 rd $U 5 61 $U 0
  524. ;;
  525. fd*)
  526. typnam=$U${i#fd[01]*}
  527. case $typnam in
  528. 0|1) typnum=0;; # no type specified, assume A
  529. *A) typnum=0; typnam=0;;
  530. *B) typnum=1;;
  531. *C) typnum=2;;
  532. *D) typnum=3;;
  533. *E) typnum=4;;
  534. *F) typnum=5;;
  535. *G) typnum=6;;
  536. *H) typnum=7;;
  537. *) echo bad type $typnam for $i; exit 1;;
  538. esac
  539. case $U in
  540. 0|1) blk=16; chr=54;;
  541. *) echo bad unit $U for $i; exit 1;;
  542. esac
  543. nam=fd${typnam}
  544. n=$(($(($U*128))+$(($typnum*16))))
  545. M ${nam}a b $blk $n 640 operator
  546. M ${nam}b b $blk $(($n+1)) 640 operator
  547. M ${nam}c b $blk $(($n+2)) 640 operator
  548. M ${nam}i b $blk $(($n+8)) 640 operator
  549. M r${nam}a c $chr $n 640 operator
  550. M r${nam}b c $chr $(($n+1)) 640 operator
  551. M r${nam}c c $chr $(($n+2)) 640 operator
  552. M r${nam}i c $chr $(($n+8)) 640 operator
  553. ;;
  554. cd*)
  555. dodisk2 cd $U 18 58 $U 0
  556. ;;
  557. local)
  558. test -s $T.local && sh $T.local
  559. ;;
  560. all)
  561. R vdsp0 vdsp1 vdsp2 vdsp3 vdsp4 vdsp5 vdsp6 vdsp7 vdsp8 vdsp9
  562. R vdsp10 vdsp11 vdsp12 vdsp13 vdsp14 vdsp15 ldom0 ldom1 ldom2
  563. R ldom3 ldom4 ldom5 ldom6 ldom7 spds hvctl ttyV0 ttyV1 ttyV2
  564. R ttyV3 ttyV4 ttyV5 ttyV6 ttyV7 cuaa cuab cuac cuad ttya ttyb
  565. R ttyc ttyd switch0 switch1 switch2 switch3 drm0 drm1 drm2
  566. R drm3 bpp0 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 sd5 sd6
  567. R sd7 sd8 sd9 cd0 cd1 rd0 tap0 tap1 tap2 tap3 tun0 tun1 tun2
  568. R tun3 bio pty0 fd1 fd1B fd1C fd1D fd1E fd1F fd1G fd1H fd0
  569. R fd0B fd0C fd0D fd0E fd0F fd0G fd0H diskmap vscsi0 ch0 audio0
  570. R audio1 audio2 audio3 dt bpf fuse pppac pppx hotplug ptm
  571. R local wscons pci0 pci1 pci2 pci3 uall rmidi0 rmidi1 rmidi2
  572. R rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 video0 video1 uk0 random
  573. R lpa0 lpa1 lpa2 lpt0 lpt1 lpt2 tty00 tty01 tty02 tty03 tty04
  574. R tty05 tty06 tty07 tty08 tty09 tty0a tty0b ttyh0 ttyh1 pf wd0
  575. R wd1 wd2 wd3 std st0 st1 fd
  576. ;;
  577. wd*|sd*)
  578. case $i in
  579. wd*) dodisk wd $U 12 26 $U 0;;
  580. sd*) dodisk sd $U 7 17 $U 0;;
  581. esac
  582. ;;
  583. *)
  584. echo $i: unknown device
  585. ;;
  586. esac
  587. done
  588. }
  589. R "$@"
  590. {
  591. echo -n ${RMlist[*]}
  592. echo -n ${mklist[*]}
  593. echo -n ${MKlist[*]}
  594. echo -n ${whlist[*]}
  595. echo ${oplist[*]}
  596. } | if [ "$eo" = "echo" ]; then
  597. cat
  598. else
  599. sh
  600. fi