1b138878dSdrahn#!/bin/sh - 2b138878dSdrahn# 3b138878dSdrahn# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. 4b138878dSdrahn# generated from: 5b138878dSdrahn# 6*abe7e67aSmiod# OpenBSD: etc.landisk/MAKEDEV.md,v 1.52 2024/03/31 10:14:35 miod Exp 7b7211c5dSderaadt# OpenBSD: MAKEDEV.common,v 1.120 2023/01/28 11:04:47 phessler Exp 81708e760Sderaadt# OpenBSD: MAKEDEV.mi,v 1.83 2016/09/11 03:06:31 deraadt Exp 914eb6812Skrw# OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp 10b138878dSdrahn# 11b138878dSdrahn# 12b138878dSdrahn# Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> 13b138878dSdrahn# 14b138878dSdrahn# Permission to use, copy, modify, and distribute this software for any 15b138878dSdrahn# purpose with or without fee is hereby granted, provided that the above 16b138878dSdrahn# copyright notice and this permission notice appear in all copies. 17b138878dSdrahn# 18b138878dSdrahn# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 19b138878dSdrahn# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 20b138878dSdrahn# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 21b138878dSdrahn# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22b138878dSdrahn# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 23b138878dSdrahn# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 24b138878dSdrahn# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 25b138878dSdrahn# 26b138878dSdrahn# Device "make" file. Valid arguments: 27b138878dSdrahn# all makes all known devices, including local devices. 28b138878dSdrahn# Tries to make the ``standard'' number of each type. 29b138878dSdrahn# ramdisk Ramdisk kernel devices 30b138878dSdrahn# std Standard devices 31b138878dSdrahn# local Configuration specific devices 32b138878dSdrahn# Disks: 33b138878dSdrahn# cd* ATAPI and SCSI CD-ROM drives 34b138878dSdrahn# ch* SCSI media changers 35b138878dSdrahn# rd* "rd" pseudo-disks 36b138878dSdrahn# sd* SCSI disks, including flopticals 37b138878dSdrahn# vnd* "file" pseudo-disk devices 38b138878dSdrahn# wd* "winchester" disk drives (ST506, IDE, ESDI, RLL, ...) 39b138878dSdrahn# Tapes: 40b138878dSdrahn# st* SCSI tape drives 41b138878dSdrahn# Terminal ports: 420396b47eSmiod# ttya on-board serial port 43b138878dSdrahn# Pseudo terminals: 44b138878dSdrahn# ptm pty master device 45b138878dSdrahn# pty* Set of 62 master pseudo terminals 46b138878dSdrahn# tty* Set of 62 slave pseudo terminals 47b138878dSdrahn# Console ports: 48b138878dSdrahn# ttyC-J* wscons display devices 49bbd68036Smiod# wscons Minimal wscons devices 50b138878dSdrahn# wskbd* wscons keyboards 51b138878dSdrahn# wsmouse* wscons mice 52b138878dSdrahn# wsmux wscons keyboard/mouse mux devices 53b138878dSdrahn# USB devices: 54b138878dSdrahn# ttyU* USB serial ports 55bbd68036Smiod# uall All USB devices 56b138878dSdrahn# ugen* Generic USB devices 57b138878dSdrahn# uhid* Generic HID devices 58c0d08ca4Sreyk# fido fido/* nodes 59e3ee239eSderaadt# ujoy ujoy/* nodes 60b138878dSdrahn# ulpt* Printer devices 61b138878dSdrahn# usb* Bus control devices used by usbd for attach/detach 62b138878dSdrahn# Special purpose devices: 63b138878dSdrahn# audio* Audio devices 6480556d8aStodd# bio ioctl tunnel pseudo-device 65881ff39bSnatano# bpf Berkeley Packet Filter 66e20c779dSmpi# dt Dynamic Tracer 67bbd68036Smiod# diskmap Disk mapper 68b138878dSdrahn# fd fd/* nodes 69d48f2927Ssyl# fuse Userland Filesystem 70bbd68036Smiod# hotplug devices hot plugging 714e7d0674Skettenis# pci* PCI bus devices 72b91554c6Skn# pf Packet Filter 734c8978c4Sclaudio# pppx* PPP Multiplexer 748af19553Sdlg# pppac* PPP Access Concentrator 75b138878dSdrahn# radio* FM tuner devices 76b138878dSdrahn# *random In-kernel random data source 77bbd68036Smiod# rmidi* Raw MIDI devices 78b138878dSdrahn# tun* Network tunnel driver 79b8bea8faSclaudio# tap* Ethernet tunnel driver 80b138878dSdrahn# uk* Unknown SCSI devices 8122d23526Sjmc# video* Video V4L2 devices 82d1e05937Sderaadt# vscsi* Virtual SCSI controller 8317e24fb9Sdlg# kstat Kernel Statistics 84b138878dSdrahnPATH=/sbin:/usr/sbin:/bin:/usr/bin 85b138878dSdrahnT=$0 86b138878dSdrahn 87b138878dSdrahn# set this to echo for Echo-Only debugging 88b138878dSdrahn[ "$eo" ] || eo= 89b138878dSdrahn 90b138878dSdrahnhex() 91b138878dSdrahn{ 92b138878dSdrahn case $1 in 93b138878dSdrahn [0-9]) echo -n $1;; 94b138878dSdrahn 10) echo -n a;; 95b138878dSdrahn 11) echo -n b;; 96b138878dSdrahn 12) echo -n c;; 97b138878dSdrahn 13) echo -n d;; 98b138878dSdrahn 14) echo -n e;; 99b138878dSdrahn 15) echo -n f;; 100b138878dSdrahn esac 101b138878dSdrahn} 102b138878dSdrahn 103b138878dSdrahnalph2d() 104b138878dSdrahn{ 105b138878dSdrahn local t="$1" 106b138878dSdrahn local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 107b138878dSdrahn local sub=${p%${t}*} 108b138878dSdrahn echo ${#sub} 109b138878dSdrahn} 110b138878dSdrahn 111b138878dSdrahnh2d() 112b138878dSdrahn{ 113b138878dSdrahn local s="$1" 114b138878dSdrahn local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*} 115b138878dSdrahn 116b138878dSdrahn echo $(($(_h2d $f)*16+ $(_h2d $n) )) 117b138878dSdrahn} 118b138878dSdrahn 119b138878dSdrahn_h2d() 120b138878dSdrahn{ 121b138878dSdrahn case $1 in 122b138878dSdrahn [0-9]) echo -n $1;; 123b138878dSdrahn a) echo -n 10;; 124b138878dSdrahn b) echo -n 11;; 125b138878dSdrahn c) echo -n 12;; 126b138878dSdrahn d) echo -n 13;; 127b138878dSdrahn e) echo -n 14;; 128b138878dSdrahn f) echo -n 15;; 129b138878dSdrahn esac 130b138878dSdrahn} 131b138878dSdrahn 132b138878dSdrahnunt() 133b138878dSdrahn{ 134b138878dSdrahn # XXX pdksh can't seem to deal with locally scoped variables 135b138878dSdrahn # in ${foo#$bar} expansions 136b138878dSdrahn arg="$1" 137b138878dSdrahn tmp="${arg#[a-zA-Z]*}" 138b138878dSdrahn tmp="${tmp%*[a-zA-Z]}" 139b138878dSdrahn while [ "$tmp" != "$arg" ] 140b138878dSdrahn do 141b138878dSdrahn arg=$tmp 142b138878dSdrahn tmp="${arg#[a-zA-Z]*}" 143b138878dSdrahn tmp="${tmp%*[a-zA-Z]}" 144b138878dSdrahn done 145b138878dSdrahn echo $arg 146b138878dSdrahn} 147b138878dSdrahn 148b138878dSdrahndodisk() 149b138878dSdrahn{ 150b138878dSdrahn [ "$DEBUG" ] && set -x 151b138878dSdrahn n=$(($((${5}*${7:-16}))+${6})) count=0 152b138878dSdrahn [ 0$7 -ne 8 ] && l="i j k l m n o p" 153b138878dSdrahn for d in a b c d e f g h $l 154b138878dSdrahn do 155b138878dSdrahn M $1$2$d b $3 $(($n+$count)) 640 operator 156b138878dSdrahn M r$1$2$d c $4 $(($n+$count)) 640 operator 157b138878dSdrahn let count=count+1 158b138878dSdrahn done 159b138878dSdrahn} 160b138878dSdrahn 161b138878dSdrahndodisk2() 162b138878dSdrahn{ 163b138878dSdrahn n=$(($(($5*${7:-16}))+$6)) 164b138878dSdrahn M $1$2a b $3 $n 640 operator 165b138878dSdrahn M r$1$2a c $4 $n 640 operator 166b138878dSdrahn n=$(($n+2)) 167b138878dSdrahn M $1$2c b $3 $n 640 operator 168b138878dSdrahn M r$1$2c c $4 $n 640 operator 169b138878dSdrahn} 170b138878dSdrahn 171b138878dSdrahn# M name b/c major minor [mode] [group] 172b138878dSdrahnRMlist[0]="rm -f" 173b138878dSdrahn 174b138878dSdrahnmkl() { 1751fc260a6Sespie : ${mklist[0]:=";mknod"} 1761fc260a6Sespie mklist[${#mklist[*]}]=" -m $1 $2 $3 $4 $5" 177b138878dSdrahn} 178b138878dSdrahn 179b138878dSdrahnM() { 180b138878dSdrahn RMlist[${#RMlist[*]}]=$1 181b138878dSdrahn mkl ${5-666} $1 $2 $3 $4 182b138878dSdrahn G=${6:-wheel} 183b138878dSdrahn [ "$7" ] && { 184fd4faf58Sjasper MKlist[${#MKlist[*]}]="&& chown $7:$G $1" 185b138878dSdrahn } || { 186b138878dSdrahn case $G in 187b138878dSdrahn wheel) 188fd4faf58Sjasper [ ${#whlist[*]} = 0 ] && whlist[0]="&& chgrp wheel" 189b138878dSdrahn whlist[${#whlist[*]}]="$1" 190b138878dSdrahn ;; 191b138878dSdrahn operator) 192fd4faf58Sjasper [ ${#oplist[*]} = 0 ] && oplist[0]="&& chgrp operator" 193b138878dSdrahn oplist[${#oplist[*]}]="$1" 194b138878dSdrahn ;; 195b138878dSdrahn *) 196fd4faf58Sjasper MKlist[${#MKlist[*]}]="&& chgrp $G $1"; 197b138878dSdrahn esac 198b138878dSdrahn } 199b138878dSdrahn return 0 200b138878dSdrahn} 201b138878dSdrahn 202b138878dSdrahnR() { 203b138878dSdrahn[ "$DEBUG" ] && set -x 204b138878dSdrahnfor i in "$@" 205b138878dSdrahndo 206b138878dSdrahnU=`unt $i` 207b138878dSdrahn[ "$U" ] || U=0 208b138878dSdrahn 209b138878dSdrahncase $i in 210b138878dSdrahnramdisk) 211881ff39bSnatano R std bpf wd0 wd1 sd0 rd0 wsmouse 212ac22d5bdSmiod R st0 ttyC0 wskbd0 bio diskmap random 213b138878dSdrahn ;; 214b138878dSdrahn 215b138878dSdrahnstd) 216b138878dSdrahn M console c 0 0 600 217b138878dSdrahn M tty c 1 0 218b138878dSdrahn M mem c 2 0 640 kmem 219b138878dSdrahn M kmem c 2 1 640 kmem 220b138878dSdrahn M null c 2 2 221b138878dSdrahn M zero c 2 12 222b138878dSdrahn M stdin c 7 0 223b138878dSdrahn M stdout c 7 1 224b138878dSdrahn M stderr c 7 2 225b138878dSdrahn M ksyms c 8 0 640 kmem 226b138878dSdrahn M klog c 6 0 600 227b138878dSdrahn ;; 228b138878dSdrahn 22917e24fb9Sdlgkstat) 23017e24fb9Sdlg M kstat c 51 0 640 23117e24fb9Sdlg ;; 23217e24fb9Sdlg 233d1e05937Sderaadtvscsi*) 234d1e05937Sderaadt M vscsi$U c 99 $U 600 235d1e05937Sderaadt ;; 236d1e05937Sderaadt 237b96daa4fSmglockervideo*) 23830531b3eSderaadt M video$U c 77 $U 600 239b96daa4fSmglocker MKlist[${#MKlist[*]}]=";[ -e video ] || ln -s video$U video" 240b96daa4fSmglocker ;; 241b96daa4fSmglocker 242b138878dSdrahnuk*) 243b138878dSdrahn M uk$U c 28 $U 640 operator 244b138878dSdrahn ;; 245b138878dSdrahn 246b8bea8faSclaudiotap*) 247b8bea8faSclaudio M tap$U c 104 $U 600 248b8bea8faSclaudio ;; 249b8bea8faSclaudio 250b138878dSdrahntun*) 251b138878dSdrahn M tun$U c 33 $U 600 252b138878dSdrahn ;; 253b138878dSdrahn 254bbd68036Smiodrmidi*) 255c4e0ad34Sratchov M rmidi$U c 57 $U 660 _sndiop 256bbd68036Smiod ;; 257bbd68036Smiod 258b138878dSdrahn*random) 2593cc3dcf8Snaddy M urandom c 40 0 644 2603cc3dcf8Snaddy RMlist[${#RMlist[*]}]=random 2613cc3dcf8Snaddy MKlist[${#MKlist[*]}]=";ln -s urandom random" 262b138878dSdrahn ;; 263b138878dSdrahn 264b138878dSdrahnradio*) 265b138878dSdrahn M radio$U c 97 $U 266b138878dSdrahn MKlist[${#MKlist[*]}]=";[ -e radio ] || ln -s radio$U radio" 267b138878dSdrahn ;; 268b138878dSdrahn 2698af19553Sdlgpppac*) 2708af19553Sdlg M pppac$U c 107 $U 600 2718af19553Sdlg ;; 2728af19553Sdlg 2734c8978c4Sclaudiopppx*) 2744c8978c4Sclaudio M pppx$U c 102 $U 600 2754c8978c4Sclaudio ;; 2764c8978c4Sclaudio 277b91554c6Sknpf) 278b138878dSdrahn M pf c 46 0 600 279b138878dSdrahn ;; 280b138878dSdrahn 2814e7d0674Skettenispci*) 2824e7d0674Skettenis M pci$U c 88 $U 600 28379cdc5d1Skrw MKlist[${#MKlist[*]}]=";[ -h pci ] || ln -sf pci0 pci" 284b138878dSdrahn ;; 285b138878dSdrahn 286bbd68036Smiodhotplug) 287bbd68036Smiod M hotplug c 37 $U 400 288bbd68036Smiod ;; 289bbd68036Smiod 290d48f2927Ssylfuse) 291e11b2ba0Stedu M fuse$U c 103 $U 600 292e11b2ba0Stedu ;; 293e11b2ba0Stedu 294b138878dSdrahnfd) 295b138878dSdrahn RMlist[${#RMlist[*]}]=";mkdir -p fd;rm -f" n=0 296b138878dSdrahn while [ $n -lt 64 ];do M fd/$n c 7 $n;n=$(($n+1));done 297b138878dSdrahn MKlist[${#MKlist[*]}]=";chmod 555 fd" 298b138878dSdrahn ;; 299b138878dSdrahn 300bbd68036Smioddiskmap) 301bbd68036Smiod M diskmap c 101 0 640 operator 302bbd68036Smiod ;; 303bbd68036Smiod 304e20c779dSmpidt) 305e20c779dSmpi M dt c 30 0 600 306e20c779dSmpi ;; 307e20c779dSmpi 308881ff39bSnatanobpf) 309881ff39bSnatano M bpf c 22 0 600 310881ff39bSnatano M bpf0 c 22 0 600 311b138878dSdrahn ;; 312b138878dSdrahn 31380556d8aStoddbio) 314*abe7e67aSmiod M bio c 38 0 600 31580556d8aStodd ;; 31680556d8aStodd 317b138878dSdrahnaudio*) 318c4e0ad34Sratchov M audio$U c 36 $U 660 _sndiop 319c4e0ad34Sratchov M audioctl$U c 36 $(($U+192)) 660 _sndiop 320b138878dSdrahn ;; 321b138878dSdrahn 322b138878dSdrahnusb*) 323b138878dSdrahn [ "$i" = "usb" ] && u= || u=$U 324ba740118Sderaadt M usb$u c 64 $U 640 325b138878dSdrahn ;; 326b138878dSdrahn 327b138878dSdrahnulpt*) 328ba740118Sderaadt M ulpt$U c 66 $U 600 329b138878dSdrahn ;; 330b138878dSdrahn 331e3ee239eSderaadtujoy) 332e3ee239eSderaadt RMlist[${#RMlist[*]}]=";mkdir -p ujoy;rm -f" n=0 333e3ee239eSderaadt while [ $n -lt 4 ];do M ujoy/$n c 108 $n 444;n=$(($n+1));done 334e3ee239eSderaadt MKlist[${#MKlist[*]}]=";chmod 555 ujoy" 335e3ee239eSderaadt ;; 336e3ee239eSderaadt 337c0d08ca4Sreykfido) 338c0d08ca4Sreyk RMlist[${#RMlist[*]}]=";mkdir -p fido;rm -f" n=0 339c0d08ca4Sreyk while [ $n -lt 4 ];do M fido/$n c 106 $n 666;n=$(($n+1));done 340c0d08ca4Sreyk MKlist[${#MKlist[*]}]=";chmod 555 fido" 341c0d08ca4Sreyk ;; 342c0d08ca4Sreyk 343b138878dSdrahnuhid*) 344ba740118Sderaadt M uhid$U c 65 $U 600 345b138878dSdrahn ;; 346b138878dSdrahn 347b138878dSdrahnugen*) 348b138878dSdrahn n=$(($U*16)) 349b138878dSdrahn for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5} 350b138878dSdrahn do 351ba740118Sderaadt M ugen$U.$j c 70 $(($n+10#$j)) 600 352b138878dSdrahn done 353b138878dSdrahn ;; 354b138878dSdrahn 355bbd68036Smioduall) 35636a8b58bSdcoppa R ttyU0 ttyU1 ttyU2 ttyU3 ugen0 ugen1 ugen2 ugen3 ugen4 ugen5 357e3ee239eSderaadt R ugen6 ugen7 ulpt0 ulpt1 ujoy fido uhid0 uhid1 uhid2 uhid3 358e3ee239eSderaadt R uhid4 uhid5 uhid6 uhid7 usb0 usb1 usb2 usb3 usb4 usb5 usb6 359e3ee239eSderaadt R usb7 360bbd68036Smiod ;; 361bbd68036Smiod 362b138878dSdrahnttyU[0-9a-zA-Z]) 363b138878dSdrahn U=${i#ttyU*} 364b138878dSdrahn o=$(alph2d $U) 365e87a9a57Sderaadt M ttyU$U c 68 $o 660 dialer root 366e87a9a57Sderaadt M cuaU$U c 68 $(($o+128)) 660 dialer root 367b138878dSdrahn ;; 368b138878dSdrahn 369b138878dSdrahnwsmux|wsmouse|wskbd) 370b138878dSdrahn M wsmouse c 63 0 600 371b138878dSdrahn M wskbd c 63 1 600 372b138878dSdrahn ;; 373b138878dSdrahn 374100f604cSmiodwsmouse[0-9]*) 375b138878dSdrahn M wsmouse$U c 62 $U 600 376b138878dSdrahn ;; 377b138878dSdrahn 378100f604cSmiodwskbd[0-9]*) 379b138878dSdrahn M wskbd$U c 61 $U 600 380b138878dSdrahn ;; 381b138878dSdrahn 382bbd68036Smiodwscons) 383446b6ae1Sjcs R wsmouse0 wsmouse1 wsmouse2 wsmouse3 wsmouse4 wsmouse5 384446b6ae1Sjcs R wsmouse6 wsmouse7 wsmouse8 wsmouse9 wskbd0 wskbd1 wskbd2 385b7211c5dSderaadt R wskbd3 wskbd4 wskbd5 wskbd6 wskbd7 wskbd8 wskbd9 wsmux 386b7211c5dSderaadt R ttyCcfg ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5 ttyC6 ttyC7 387b7211c5dSderaadt R ttyC8 ttyC9 ttyCa ttyCb 388bbd68036Smiod ;; 389bbd68036Smiod 390b138878dSdrahntty[C-J]*) 391b138878dSdrahn U=${i##tty[C-J]} 392b138878dSdrahn case $i in 393b138878dSdrahn ttyC*) n=C m=0;; 394b138878dSdrahn ttyD*) n=D m=256;; 395b138878dSdrahn ttyE*) n=E m=512;; 396b138878dSdrahn ttyF*) n=F m=768;; 397b138878dSdrahn ttyG*) n=G m=1024;; 398b138878dSdrahn ttyH*) n=H m=1280;; 399b138878dSdrahn ttyI*) n=I m=1536;; 400b138878dSdrahn ttyJ*) n=J m=1792;; 401b138878dSdrahn esac 402b138878dSdrahn case $U in 403b138878dSdrahn [0-9a-f]) M tty$n$U c 60 $((16#$U+$m)) 600;; 404b138878dSdrahn cfg) M tty${n}cfg c 60 $((255+$m)) 600;; 405b138878dSdrahn *) echo bad unit $U for $i; exit 1;; 406b138878dSdrahn esac 407b138878dSdrahn ;; 408b138878dSdrahn 409b138878dSdrahnpty*) 410b138878dSdrahn if [ $U -gt 15 ]; then 411b138878dSdrahn echo bad unit for pty in: $i 412b138878dSdrahn continue 413b138878dSdrahn fi 414b138878dSdrahn set -A letters p q r s t u v w x y z P Q R S T 415b138878dSdrahn 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 \ 416b138878dSdrahn 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 \ 417b138878dSdrahn Y Z 418b138878dSdrahn 419b138878dSdrahn name=${letters[$U]} 420b138878dSdrahn n=0 421b138878dSdrahn while [ $n -lt 62 ] 422b138878dSdrahn do 423b138878dSdrahn nam=$name${suffixes[$n]} 424b138878dSdrahn off=$(($U*62)) 425b138878dSdrahn M tty$nam c 4 $(($off+$n)) 426b138878dSdrahn M pty$nam c 5 $(($off+$n)) 427b138878dSdrahn n=$(($n+1)) 428b138878dSdrahn done 429b138878dSdrahn ;; 430b138878dSdrahn 431b138878dSdrahnptm) 432b138878dSdrahn M ptm c 98 0 666 433b138878dSdrahn ;; 434b138878dSdrahn 4350396b47eSmiodttya) 436e87a9a57Sderaadt M ttya c 11 0 660 dialer root 437b138878dSdrahn ;; 438b138878dSdrahn 439b138878dSdrahnst*) 440b138878dSdrahn n=$(($U*16)) 441b138878dSdrahn for pre in " " n e en 442b138878dSdrahn do 443b138878dSdrahn M ${pre}rst$U c 25 $n 660 operator 444b138878dSdrahn n=$(($n+1)) 445b138878dSdrahn done 446b138878dSdrahn ;; 447b138878dSdrahn 448b138878dSdrahnvnd*) 449b138878dSdrahn dodisk vnd $U 19 19 $U 0 450b138878dSdrahn ;; 451b138878dSdrahn 452b138878dSdrahnrd*) 453b138878dSdrahn dodisk2 rd $U 18 18 $U 0 454b138878dSdrahn ;; 455b138878dSdrahn 456b138878dSdrahnch*) 457b138878dSdrahn M ch$U c 27 $U 660 operator 458b138878dSdrahn ;; 459b138878dSdrahn 460b138878dSdrahncd*) 461b138878dSdrahn dodisk2 cd $U 26 26 $U 0 462b138878dSdrahn ;; 463b138878dSdrahn 464b138878dSdrahnlocal) 465b138878dSdrahn test -s $T.local && sh $T.local 466b138878dSdrahn ;; 467b138878dSdrahn 468b138878dSdrahnall) 4694402f70cSclaudio R vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 sd9 4704402f70cSclaudio R cd0 cd1 rd0 tap0 tap1 tap2 tap3 tun0 tun1 tun2 tun3 bio pty0 4714402f70cSclaudio R diskmap vscsi0 ch0 ttya audio0 audio1 audio2 audio3 kstat dt 4724402f70cSclaudio R bpf fuse pppac pppx hotplug ptm local wscons pci0 pci1 pci2 4734402f70cSclaudio R pci3 uall rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 4744402f70cSclaudio R rmidi7 radio0 video0 video1 uk0 random pf wd0 wd1 wd2 wd3 4754402f70cSclaudio R std st0 st1 fd 476b138878dSdrahn ;; 477b138878dSdrahn 47844885c5fSjsingwd*|sd*) 479b138878dSdrahn case $i in 480b138878dSdrahn wd*) dodisk wd $U 16 16 $U 0;; 481b138878dSdrahn sd*) dodisk sd $U 24 24 $U 0;; 482b138878dSdrahn esac 483b138878dSdrahn ;; 484b138878dSdrahn 485b138878dSdrahn*) 486b138878dSdrahn echo $i: unknown device 487b138878dSdrahn ;; 488b138878dSdrahnesac 489b138878dSdrahndone 490b138878dSdrahn} 491b138878dSdrahnR "$@" 492b138878dSdrahn{ 493b138878dSdrahnecho -n ${RMlist[*]} 494b138878dSdrahnecho -n ${mklist[*]} 495b138878dSdrahnecho -n ${MKlist[*]} 496b138878dSdrahnecho -n ${whlist[*]} 497b138878dSdrahnecho ${oplist[*]} 498b138878dSdrahn} | if [ "$eo" = "echo" ]; then 499b138878dSdrahn cat 500b138878dSdrahnelse 501b138878dSdrahn sh 502b138878dSdrahnfi 503