/[baselayout]/trunk/sbin/MAKEDEV
Gentoo

Diff of /trunk/sbin/MAKEDEV

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 333 Revision 334
13 public=" root root 0666" 13 public=" root root 0666"
14private=" root root 0600" 14private=" root root 0600"
15 system=" root root 0660" 15 system=" root root 0660"
16 kmem=" root kmem 0640" 16 kmem=" root kmem 0640"
17 tty=" root tty 0666" 17 tty=" root tty 0666"
18 cons=" root tty 0622" 18 cons=" root tty 0600"
19 vcs=" root root 0600" 19 vcs=" root root 0600"
20dialout=" root dialout 0660" 20dialout=" root dialout 0660"
21 dip=" root dip 0660"
21 mouse=" root root 0660" 22 mouse=" root root 0660"
22printer=" root lp 0660" 23printer=" root lp 0660"
23 floppy=" root floppy 0660" 24 floppy=" root floppy 0660"
24 disk=" root disk 0660" 25 disk=" root disk 0660"
25 scsi=" root root 0600" 26 scsi=" root root 0600"
26 cdrom=" root disk 0660" 27 cdrom=" root cdrom 0660"
27 tape=" root tape 0660" 28 tape=" root tape 0660"
28 audio=" root audio 0660" 29 audio=" root audio 0660"
29 video=" root root 0660" 30 video=" root video 0660"
31 fb=" root video 0620"
30 ibcs2=" root root 0666" 32 ibcs2=" root root 0666"
31scanner=" root root 0666" 33scanner=" root root 0666"
32 coda=" root root 0600" 34 coda=" root root 0600"
33 ipsec=" root root 0200" 35 ipsec=" root root 0200"
34readable=" root root 0444" 36readable=" root root 0444"
38# defaults for $major_* 40# defaults for $major_*
39major_ide0=3 41major_ide0=3
40major_ide1=22 42major_ide1=22
41major_sd=8 43major_sd=8
42major_lp=6 44major_lp=6
45
46# Remark: OSS/Linux becomes major_OSSLinux
47
48#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
49
50# don't stomp on devfs users
51if [ -c .devfsd ]
52then
53 echo ".devfsd presence implies active DevFS. Aborting MAKEDEV invocation."
54 # use exit 0, not 1, so postinst scripts don't fail on this
55 exit 0
56fi
43 57
44#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---# 58#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
45 59
46procfs=/proc 60procfs=/proc
47 61
103 [ ! "$opt_d" ] && ln -s $2 $1 117 [ ! "$opt_d" ] && ln -s $2 $1
104} 118}
105 119
106#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---# 120#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
107 121
108# For bash and ksh, we can use faster builtin routines to do manipulation, 122# Debian allows us to assume /bin/sh is a POSIX compliant shell, so go for it!
109# otherwise (ash) fall back to slower method using `expr'.
110# The extra level of indirection using `eval' is necessary a) for ksh, and
111# b) to get past ash.
112 123
113if [ "$RANDOM" != "$RANDOM" ]
114then
115 math () { 124math () {
116 eval echo "\$(($*))" 125 eval echo "\$(($*))"
117 } 126}
118 index () { # index string c 127index () { # index string c
119 eval "I=\${1%$2*}" 128 eval "I=\${1%$2*}"
120 eval echo "\${#I}" 129 eval echo "\${#I}"
121 } 130}
122 suffix () { 131suffix () {
123 eval echo "\${1#$2}" 132 eval echo "\${1#$2}"
124 } 133}
125 strip () { 134strip () {
126 eval echo "\${1% $2 *} \${1#* $2 }" 135 eval echo "\${1% $2 *} \${1#* $2 }"
127 } 136}
128 first () { 137first () {
129 eval echo "\${1:0:1}" 138 eval echo "\${1:0:1}"
130 } 139}
131 second () { 140second () {
132 eval echo "\${1:1:1}" 141 eval echo "\${1:1:1}"
133 } 142}
134else 143substr () {
135 math () { 144 echo $1 | cut -c $2
136 expr "$@" 145}
137 }
138 index () { # index string c
139 expr $1 : ".*$2" - 1
140 }
141 suffix () {
142 expr "$1" : "$2\(.*\)"
143 }
144 strip () {
145 echo "[$1][$2]" >&2
146 echo "`expr \"$1\" : \"\(.*\) $2 \"` `expr \"$1\" : \".* $2 \(.*\)\"`"
147 }
148 first () {
149 expr "$1" : "\(.\)"
150 }
151 second () {
152 expr "$1" : ".\(.\)"
153 }
154fi
155 146
156#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---# 147#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
157 148
158devices= 149devices=
159if [ ! -f $procfs/devices ] 150if [ ! -f $procfs/devices ]
161 echo "$0: warning: can't read $procfs/devices" >&2 152 echo "$0: warning: can't read $procfs/devices" >&2
162else 153else
163 exec 3<$procfs/devices 154 exec 3<$procfs/devices
164 while read major device <&3 155 while read major device <&3
165 do 156 do
166 device=${device%/*} 157 device=`echo $device | sed 's#/.*##'`
167 case "$major" in 158 case "$major" in
168 Character|Block|'') 159 Character|Block|'')
169 ;; 160 ;;
170 *) 161 *)
171 eval "major_$device=$major" 162 eval "major_$device=$major"
188 179
189cvt () { 180cvt () {
190 while [ $# -ne 0 ] 181 while [ $# -ne 0 ]
191 do 182 do
192 case "$1" in 183 case "$1" in
193 mem|tty|ttyp|cua|cub) ;; 184 mem|tty|ttyp|cua|cub|cui) ;;
194 hd) (for d in a b c d e f g h ; do 185 hd) (for d in a b c d e f g h ; do
195 echo -n hd$d " " 186 echo -n hd$d " "
196 done) ; echo 187 done) ; echo
197 ;; 188 ;;
198 ide0) echo hda hdb ;; 189 ide0) echo hda hdb ;;
199 ide1) echo hdc hdd ;; 190 ide1) echo hdc hdd ;;
200 ide2) echo hde hdf ;; 191 ide2) echo hde hdf ;;
201 ide3) echo hdg hdh ;; 192 ide3) echo hdg hdh ;;
193 ide4) echo hdi hdj ;;
194 ide5) echo hdk hdl ;;
202 sd) echo sda sdb sdc sdd ;; 195 sd) echo sda sdb sdc sdd ;;
196 dasd) (for d in a b c d e f g h i j k l m \
197 n o p q r s t u v w x y z ; do
198 echo -n dasd$d " "
199 done) ; echo
200 ;;
201 raw) echo raw ;;
203 sg) echo sg ;; 202 sg) echo sg ;;
204 sr) echo scd0 ;; 203 sr) echo scd ;;
205 st) echo st0 ;; 204 st) echo st0 ;;
206 xd) echo xda xdb ;; 205 xd) echo xda xdb ;;
207 ad) echo ada adb ;; 206 ad) echo ada adb ;;
208 fd) echo fd0 fd1 ;; 207 fd) echo fd0 fd1 ;;
209 lp) echo lp ;; 208 lp) echo lp ;;
210 mt) echo ftape ;; 209 mt) echo ftape ;;
210 qft) echo ftape ;;
211 loop) echo loop ;; 211 loop) echo loop ;;
212 md) echo md ;; 212 md) echo md ;;
213 ibcs2) echo ibcs2 ;; 213 ibcs2) echo ibcs2 ;;
214 tpqic02) echo qic ;; 214 tpqic02) echo qic ;;
215 sound) echo audio ;; 215 sound) echo audio ;;
216 logiscan) echo logiscan ;; 216 logiscan) echo logiscan ;;
217 ac4096) echo ac4096 ;; 217 ac4096) echo ac4096 ;;
218 hw) echo helloworld ;; 218 hw) echo helloworld ;;
219 sbpcd | sbpcd[123]) echo $1 ;; 219 sbpcd | sbpcd[123]) echo $1 ;;
220 joystick) echo js ;; 220 joystick) echo js ;;
221 input) echo input ;;
221 apm_bios) echo apm ;; 222 apm_bios) echo apm ;;
222 dcf) echo dcf ;; 223 dcf) echo dcf ;;
223 aztcd) echo aztcd ;; 224 aztcd) echo aztcd ;;
225 cm206cd) echo cm206cd ;;
226 gscd) echo gscd ;;
224 pcmcia) ;; # taken care of by its own driver 227 pcmcia) ;; # taken care of by its own driver
225 ttyC) echo cyclades ;; 228 ttyC) echo cyclades ;;
226 isdn) echo isdnmodem isdnbri dcbri ;; 229 isdn) echo isdnmodem isdnbri dcbri ;;
227 vcs) ;; 230 vcs) ;;
228 pty) echo pty ;; 231 pty) echo pty ;;
229 misc) echo misc ;; 232 misc) echo misc ;;
233 3dfx) echo 3dfx ;;
234 agpgart) echo agpgart ;;
235 microcode) echo microcode ;;
236 ipmi|ipmikcs) echo ipmi ;;
230 fb) echo fb ;; 237 fb) echo fb ;;
238 nb) echo nb0 nb1 ;;
231 netlink) echo netlink ;; 239 netlink) echo netlink ;;
240 tap) echo netlink ;;
232 hamradio) echo hamradio ;; 241 hamradio) echo hamradio ;;
233 snd) ;; 242 snd) ;;
234 ptm) ;; 243 ptm) ;;
235 pts) ;; 244 pts) ;;
236 ttyS) echo ttyS0 ttyS1 ttyS2 ttyS3 ;; 245 ttyS) echo ttyS0 ttyS1 ttyS2 ttyS3 ;;
246 ttyI) echo ttyI0 ttyI1 ttyI2 ttyI3 ;;
247 ircomm|irlpt) irda ;;
248 ppp) echo ppp ;;
249 usb) echo usb ;;
250 lvm) ;; # taken care of by LVM userspace tools
251 ramdisk) echo ram ;;
237 *) echo "$0: don't know what \"$1\" is" >&2 ;; 252 *) echo "$0: don't know what \"$1\" is" >&2 ;;
238 esac 253 esac
239 shift 254 shift
240 done 255 done
241} 256}
242 257
243for arg 258for arg
244do 259do
260# case `cvt $arg` in
245 case $arg in 261 case $arg in
246 generic) 262 generic)
263 if [ -n "`which dpkg 2> /dev/null`" ]
264 then
247 # pick the right generic-<arch> using dpkg's knowledge 265 # pick the right generic-<arch> using dpkg's knowledge
248 case `dpkg --print-installation-architecture` in 266 case `dpkg --print-installation-architecture` in
267 alpha)
268 $0 $opts generic-alpha
269 ;;
270 arm)
271 $0 $opts generic-arm
272 ;;
273 hppa)
274 $0 $opts generic-hppa
275 ;;
249 i386) 276 i386)
250 $0 $opts generic-i386 277 $0 $opts generic-i386
251 ;; 278 ;;
279 ia64)
280 $0 $opts generic-ia64
281 ;;
252 m68k) 282 m68k)
253 $0 $opts generic-m68k 283 $0 $opts generic-m68k
254 ;; 284 ;;
285 mips)
286 $0 $opts generic-mips
287 ;;
288 mipsel)
289 $0 $opts generic-mipsel
290 ;;
255 powerpc) 291 powerpc)
256 $0 $opts generic-powerpc 292 $0 $opts generic-powerpc
257 ;; 293 ;;
294 s390)
295 $0 $opts generic-s390
296 ;;
258 sparc) 297 sparc)
259 $0 $opts generic-sparc 298 $0 $opts generic-sparc
260 ;; 299 ;;
261 mips)
262 $0 $opts generic-mips
263 ;;
264 *) 300 *)
265 echo "$0: no support for generic-$arg" >&2 301 echo "$0: no support for generic on this arch" >&2
266 exit 1 302 exit 1
267 ;; 303 ;;
268 esac 304 esac
305 else
306 $0 $opts std
307 $0 $opts fd
308 $0 $opts fd0 fd1
309 $0 $opts hda hdb
310 $0 $opts xda xdb
311 $0 $opts sda sdb
312 $0 $opts pty
313 $0 $opts console
314 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
315 $0 $opts busmice
316 $0 $opts lp
317 $0 $opts par
318 fi
269 ;; 319 ;;
270 generic-i386) 320 generic-alpha)
321 export MDARCH="alpha"
271 $0 $opts std 322 $0 $opts std
272 $0 $opts fd 323 $0 $opts fd
273 $0 $opts fd0 fd1 324 $0 $opts fd0 fd1
274 $0 $opts hda hdb hdc hdd 325 $0 $opts hda hdb hdc hdd
275 $0 $opts xda xdb 326 $0 $opts xda xdb
276 $0 $opts sda sdb sdc sdd 327 $0 $opts sda sdb sdc sdd
328 $0 $opts scd0 scd1
329 $0 $opts st0 st1
330 $0 $opts sg
277 $0 $opts pty 331 $0 $opts pty
278 $0 $opts console 332 $0 $opts console
279 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3 333 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
280 $0 $opts busmice 334 $0 $opts busmice
281 $0 $opts lp 335 $0 $opts lp
282 $0 $opts par 336 $0 $opts par
337 $0 $opts audio
283 $0 $opts fb 338 $0 $opts fb
284 ;; 339 ;;
285 generic-m68k) 340 generic-arm)
341 export MDARCH="arm"
286 $0 $opts std 342 $0 $opts std
287 $0 $opts fd 343 $0 $opts fd
288 $0 $opts fd0-bare fd1-bare 344 $0 $opts fd0 fd1
345 $0 $opts hda hdb hdc hdd
289 $0 $opts hda hdb 346 $0 $opts xda xdb
347 $0 $opts sda sdb sdc sdd
348 $0 $opts scd0 scd1
349 $0 $opts st0 st1
350 $0 $opts sg
351 $0 $opts pty
352 $0 $opts console
353 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
354 $0 $opts busmice
355 $0 $opts lp
356 $0 $opts par
357 $0 $opts audio
358 $0 $opts fb
359 ;;
360 generic-hppa)
361 export MDARCH="hppa"
362 $0 $opts std
363 $0 $opts fd
364 $0 $opts fd0 fd1
365 $0 $opts sda sdb sdc sdd
366 $0 $opts scd0 scd1
367 $0 $opts st0 st1
368 $0 $opts sg
369 $0 $opts pty
370 $0 $opts console
371 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
372 $0 $opts busmice
373 $0 $opts lp
374 $0 $opts par
375 $0 $opts audio
376 $0 $opts fb
377 $0 $opts rtc
378 ;;
379 generic-i386)
380 export MDARCH="i386"
381 $0 $opts std
382 $0 $opts fd
383 $0 $opts fd0 fd1
384 $0 $opts hda hdb hdc hdd
290 $0 $opts sda sdb 385 $0 $opts xda xdb
386 $0 $opts sda sdb sdc sdd
387 $0 $opts scd0 scd1
388 $0 $opts st0 st1
389 $0 $opts sg
390 $0 $opts pty
391 $0 $opts console
392 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
393 $0 $opts busmice
394 $0 $opts lp
395 $0 $opts par
396 $0 $opts audio
397 $0 $opts fb
398 $0 $opts isdn-io eda edb sonycd mcd mcdx cdu535
399 $0 $opts optcd sjcd cm206cd gscd
400 $0 $opts lmscd sbpcd aztcd bpcd dac960 ida ataraid cciss
401 ;;
402 generic-ia64)
403 export MDARCH="ia64"
404 $0 $opts std
405 $0 $opts fd
406 $0 $opts fd0 fd1
407 $0 $opts hda hdb hdc hdd
291 $0 $opts ada adb 408 $0 $opts xda xdb
409 $0 $opts sda sdb sdc sdd
410 $0 $opts scd0 scd1
411 $0 $opts st0 st1
412 $0 $opts sg
413 $0 $opts pty
414 $0 $opts console
415 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3 ttyS4 ttyS5
416 $0 $opts busmice
417 $0 $opts lp
418 $0 $opts par
419 $0 $opts audio
420 $0 $opts fb
421 $0 $opts efirtc
422 ;;
423 generic-m68k)
424 export MDARCH="m68k"
425 $0 $opts std
426 $0 $opts fd
427 $0 $opts fd0 fd1
428 $0 $opts hda hdb hdc hdd
429 $0 $opts sda sdb sdc sdd
430 $0 $opts sg
431 $0 $opts ada adb adc add ade adf
292 $0 $opts pty 432 $0 $opts pty
293 $0 $opts console 433 $0 $opts console
294 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3 ttyS5 434 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3 ttyS5
295 $0 $opts m68k-mice 435 $0 $opts m68k-mice
296 $0 $opts lp 436 $0 $opts lp
297 $0 $opts par 437 $0 $opts par
298 $0 $opts nvram 438 $0 $opts nvram
299 $0 $opts audio 439 $0 $opts audio
300 $0 $opts fb 440 $0 $opts fb
301 ;; 441 ;;
302 generic-powerpc)
303 $0 $opts std
304 $0 $opts fd
305 $0 $opts fd0-bare fd1-bare
306 $0 $opts hda hdb
307 $0 $opts sda sdb sdc sdd
308 $0 $opts scd0 scd1
309 $0 $opts st0 st1
310 $0 $opts pty
311 $0 $opts console
312 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
313 $0 $opts busmice
314 $0 $opts lp
315 $0 $opts par
316 $0 $opts nvram
317 $0 $opts audio
318 $0 $opts adb
319 $0 $opts fb
320 $0 $opts rtc
321 ;;
322 generic-sparc)
323 $0 $opts std
324 $0 $opts fd0-bare fd1-bare
325 $0 $opts hda hdb
326 $0 $opts sda sdb sdc sdd
327 $0 $opts scd0 scd1
328 $0 $opts st0 st1
329 $0 $opts pty
330 $0 $opts console
331 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
332 $0 $opts fb
333 $0 $opts rtc
334 makedev kbd c 11 0 $cons
335 makedev sunmouse c 10 6 $mouse
336 ln -sf sunmouse mouse
337 ;;
338 generic-mips) 442 generic-mips)
443 export MDARCH="mips"
339 $0 $opts std 444 $0 $opts std
340 $0 $opts fd 445 $0 $opts fd
341 $0 $opts fd0 fd1 446 $0 $opts fd0 fd1
342 $0 $opts hda hdb 447 $0 $opts hda hdb
343 $0 $opts sda sdb sdc sdd 448 $0 $opts sda sdb sdc sdd
344 $0 $opts scd0 scd1 449 $0 $opts scd0 scd1
345 $0 $opts st0 st1 450 $0 $opts st0 st1
346 $0 $opts sg 451 $0 $opts sg
347 $0 $opts pty 452 $0 $opts pty
348 $0 $opts console 453 $0 $opts console
349 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3 454 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
455 $0 $opts lp
456 $0 $opts par
457 $0 $opts audio
458 $0 $opts fb
459 $0 $opts busmice
460 ;;
461 generic-mipsel)
462 export MDARCH="mipsel"
463 $0 $opts std
464 $0 $opts fd
465 $0 $opts fd0 fd1
466 $0 $opts hda hdb
467 $0 $opts sda sdb sdc sdd
468 $0 $opts scd0 scd1
469 $0 $opts st0 st1
470 $0 $opts sg
471 $0 $opts pty
472 $0 $opts console
473 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
350 $0 $opts lp 474 $0 $opts lp
351 $0 $opts par 475 $0 $opts par
352 $0 $opts audio 476 $0 $opts audio
353 $0 $opts fb 477 $0 $opts fb
354 $0 $opts rtc 478 $0 $opts rtc
479 ;;
480 generic-powerpc)
481 export MDARCH="powerpc"
482 $0 $opts std
483 $0 $opts fd
484 $0 $opts fd0 fd1
485 $0 $opts hda hdb hdc hdd
486 $0 $opts sda sdb sdc sdd
487 $0 $opts scd0 scd1
488 $0 $opts st0 st1
489 $0 $opts sg
490 $0 $opts pty
491 $0 $opts console
492 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
355 $0 $opts busmice 493 $0 $opts busmice
494 $0 $opts m68k-mice
495 $0 $opts input
496 $0 $opts lp
497 $0 $opts par
498 $0 $opts nvram
499 $0 $opts audio
500 $0 $opts adb
501 $0 $opts fb
502 $0 $opts rtc
503 $0 $opts isdn-io
504 ;;
505 generic-s390)
506 export MDARCH="s390"
507 $0 $opts std
508 $0 $opts fd
509 $0 $opts dasda dasdb dasdc dasdd dasde dasdf dasdg dasdh \
510 dasdi dasdj dasdk dasdl dasdm dasdn dasdo dasdp \
511 dasdq dasdr dasds dasdt dasdu dasdv dasdw dasdx \
512 dasdy dasdz
513 $0 $opts pty
514 $0 $opts consoleonly
515 $0 $opts rtc
516 ;;
517 generic-sparc)
518 export MDARCH="sparc"
519 $0 $opts std
520 $0 $opts fd0-bare fd1-bare
521 $0 $opts hda hdb hdc hdd
522 $0 $opts sda sdb sdc sdd
523 $0 $opts scd0 scd1
524 $0 $opts st0 st1
525 $0 $opts sg
526 $0 $opts pty
527 $0 $opts console
528 $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
529 $0 $opts busmice
530 $0 $opts fb
531 $0 $opts rtc
532 makedev kbd c 11 0 $cons
533 makedev sunmouse c 10 6 $mouse
534 symlink mouse sunmouse
535 makedev openprom c 10 139 $mouse
356 ;; 536 ;;
357 local) 537 local)
358 $0.local $opts 538 $0.local $opts
359 ;; 539 ;;
360 std) 540 std)
363 makedev null c 1 3 $public 543 makedev null c 1 3 $public
364 makedev port c 1 4 $kmem 544 makedev port c 1 4 $kmem
365 makedev zero c 1 5 $public 545 makedev zero c 1 5 $public
366 symlink core $procfs/kcore 546 symlink core $procfs/kcore
367 makedev full c 1 7 $public 547 makedev full c 1 7 $public
368 makedev random c 1 8 $readable 548 makedev random c 1 8 $public
369 makedev urandom c 1 9 $readable 549 makedev urandom c 1 9 $readable
370 makedev tty c 5 0 $tty 550 makedev tty c 5 0 $tty
371 $0 ram 551 $0 $opts ram
372 $0 loop 552 $0 $opts loop
373 ;; 553 ;;
374 hamradio) 554 hamradio)
375 $0 scc 555 $0 $opts scc
376 $0 bc 556 $0 $opts bc
377 ;; 557 ;;
378 scc) 558 scc)
379 for unit in 0 1 2 3 4 5 6 7 559 for unit in 0 1 2 3 4 5 6 7
380 do 560 do
381 makedev scc$unit c 34 $unit $system 561 makedev scc$unit c 34 $unit $system
386 do 566 do
387 makedev bc$unit c 51 $unit $system 567 makedev bc$unit c 51 $unit $system
388 done 568 done
389 ;; 569 ;;
390 random) 570 random)
391 makedev random c 1 8 $readable 571 makedev random c 1 8 $public
392 ;; 572 ;;
393 urandom) 573 urandom)
394 makedev urandom c 1 9 $readable 574 makedev urandom c 1 9 $readable
395 ;; 575 ;;
396 ram) 576 ram)
397 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do 577 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
398 makedev ram$i b 1 $i $disk 578 makedev ram$i b 1 $i $disk
399 done 579 done
400 ln -sf ram1 ram 580 symlink ram ram1
581 ;;
582 ram[0-9]|ram1[0-6])
583 unit=`suffix $arg ram`
584 makedev ram$unit b 1 $unit $disk
401 ;; 585 ;;
402 initrd) 586 initrd)
403 makedev initrd b 1 250 $disk 587 makedev initrd b 1 250 $disk
404 ;; 588 ;;
589 raw)
590 makedev raw c 162 0 $disk
591 symlink rawctl raw
592 for i in 1 2 3 4 5 6 7 8; do
593 makedev raw$i c 162 $i $disk
594 done
595 ;;
405 console) 596 consoleonly)
406 major=`Major vcs` # not fatal
407 makedev tty0 c 4 0 $cons 597 makedev tty0 c 4 0 $cons
408 # console
409 # new kernels need a device, old ones a symlink... sigh 598 # new kernels need a device, old ones a symlink... sigh
410 kern_rev1=`uname -r | awk -F'.' '{print $1}'` 599 kern_rev1=`uname -r | awk -F'.' '{print $1}'`
411 kern_rev2=`uname -r | awk -F'.' '{print $2}'` 600 kern_rev2=`uname -r | awk -F'.' '{print $2}'`
412 if [ $kern_rev1 -gt 2 ] 601 if [ $kern_rev1 -gt 2 ]
413 then 602 then
418 makedev console c 5 1 $cons 607 makedev console c 5 1 $cons
419 else 608 else
420 symlink console tty0 609 symlink console tty0
421 fi 610 fi
422 fi 611 fi
612 ;;
613 console)
614 $0 $opts consoleonly
615 major=`Major vcs 7` # not fatal
423 [ "$major" ] && makedev vcs0 c $major 0 $vcs 616 [ "$major" ] && makedev vcs0 c $major 0 $vcs
617 symlink vcs vcs0
424 [ "$major" ] && makedev vcsa c $major 128 $vcs 618 [ "$major" ] && makedev vcsa0 c $major 128 $vcs
619 symlink vcsa vcsa0
425 # individual vts 620 # individual vts
426 line=1 621 line=1
427 while [ $line -le $MAXVT -a $line -le 63 ] 622 while [ $line -le $MAXVT -a $line -le 63 ]
428 do 623 do
429 makedev tty$line c 4 $line $tty 624 makedev tty$line c 4 $line $tty
431 [ "$major" ] && makedev vcsa$line c $major `math $line + 128` $vcs 626 [ "$major" ] && makedev vcsa$line c $major `math $line + 128` $vcs
432 line=`math $line + 1` 627 line=`math $line + 1`
433 done 628 done
434 ;; 629 ;;
435 adb) 630 adb)
631 myarch=
632
633 if [ -n "`which dpkg 2> /dev/null`" ]
634 then
436 # pick the right arch device using dpkg's knowledge 635 # pick the right arch device using dpkg's knowledge
437 case `dpkg --print-installation-architecture` in 636 myarch="`dpkg --print-installation-architecture`"
637
638 elif [ -n "${MDARCH}" ]
639 then
640 myarch="${MDARCH}"
641 fi
642
643 case $myarch in
438 powerpc) 644 powerpc)
439 # ADB bus devices (char) 645 # ADB bus devices (char)
440 makedev adb c 56 0 $mouse 646 makedev adb c 56 0 $mouse
441 makedev adbmouse c 10 10 $mouse 647 makedev adbmouse c 10 10 $mouse
442 ;; 648 ;;
443 m68k) 649 m68k)
444 # ACSI disk 2, whole device (block) 650 # ACSI disk 2, whole device (block)
445 makedev adb b 28 16 $disk 651 makedev adb b 28 16 $disk
446 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 652 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
447 do 653 do
448 minor=`expr 16 + $part` 654 minor=$(( 16 + $part ))
449 makedev adb$part b 28 $minor $disk 655 makedev adb$part b 28 $minor $disk
450 done 656 done
451 ;; 657 ;;
452 *) 658 *)
453 echo "no support for adb on $arg" >&2 659 echo "no support for adb on this arch" >&2
454 exit 1 660 exit 1
455 ;; 661 ;;
456 esac 662 esac
457 ;; 663 ;;
664 raw1394)
665 makedev raw1394 c 171 0 $disk
666 ;;
458 nvram) 667 nvram)
459 makedev nvram c 10 144 $kmem 668 makedev nvram c 10 144 $mouse
460 ;; 669 ;;
461 tty[1-9]|tty[1-5][0-9]|tty[6][0-3]) 670 tty[1-9]|tty[1-5][0-9]|tty[6][0-3])
462 line=`suffix $arg tty` 671 line=`suffix $arg tty`
463 makedev tty$line c 4 $line $tty 672 makedev tty$line c 4 $line $tty
464 ;; 673 ;;
492 ;; 701 ;;
493 cyclades|ttyC) 702 cyclades|ttyC)
494 major1=`Major ttyC 19` || continue 703 major1=`Major ttyC 19` || continue
495 #major2=`Major cub 20` || continue 704 #major2=`Major cub 20` || continue
496 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \ 705 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \
497 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 706 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
498 do 707 do
499 makedev ttyC$i c $major1 $i $tty 708 makedev ttyC$i c $major1 $i $dialout
500 #makedev cub$i c $major2 $i $dialout 709 #makedev cub$i c $major2 $i $dialout
501 done 710 done
502 ;; 711 ;;
503 stallion|ttyE) 712 stallion|ttyE)
504 major1=`Major ttyE 24` || continue 713 major1=`Major ttyE 24` || continue
507 minor=0 716 minor=0
508 until [ $minor -gt 256 ] 717 until [ $minor -gt 256 ]
509 do 718 do
510 makedev ttyE$minor c $major1 $minor $dialout 719 makedev ttyE$minor c $major1 $minor $dialout
511 #makedev cue$minor c $major2 $minor $dialout 720 #makedev cue$minor c $major2 $minor $dialout
512 minor=`math minor + 1` 721 minor=`math $minor + 1`
513 done 722 done
514 for i in 0 1 2 3 723 for i in 0 1 2 3
515 do 724 do
516 makedev staliomem$i c $majorc $i $private 725 makedev staliomem$i c $majorc $i $private
517 done 726 done
522 minor=0 731 minor=0
523 until [ $minor -gt 16 ] # tell me if 16 is wrong 732 until [ $minor -gt 16 ] # tell me if 16 is wrong
524 do 733 do
525 makedev ttyH$minor c $major1 $minor $dialout 734 makedev ttyH$minor c $major1 $minor $dialout
526 #makedev cuh$minor c $major2 $minor $dialout 735 #makedev cuh$minor c $major2 $minor $dialout
527 minor=`math minor + 1` 736 minor=`math $minor + 1`
528 done 737 done
529 ;; 738 ;;
530 rocketport|ttyR) 739 rocketport|ttyR)
531 major1=`Major ttyR 46` || continue 740 major1=`Major ttyR 46` || continue
532 #major2=`Major cur 47` || continue 741 #major2=`Major cur 47` || continue
533 minor=0 742 minor=0
534 until [ $minor -gt 64 ] # tell me if 64 is wrong 743 until [ $minor -gt 64 ] # tell me if 64 is wrong
535 do 744 do
536 makedev ttyR$minor c $major1 $minor $dialout 745 makedev ttyR$minor c $major1 $minor $dialout
537 #makedev cur$minor c $major2 $minor $dialout 746 #makedev cur$minor c $major2 $minor $dialout
538 minor=`math minor + 1` 747 minor=`math $minor + 1`
539 done 748 done
540 ;; 749 ;;
541 ttyV) 750 ttyV)
542 major1=`Major ttyV 105` || continue 751 major1=`Major ttyV 105` || continue
543 #major2=`Major cuv 106` || continue 752 #major2=`Major cuv 106` || continue
544 minor=0 753 minor=0
545 until [ $minor -gt 16 ] # tell me if 16 is wrong 754 until [ $minor -gt 16 ] # tell me if 16 is wrong
546 do 755 do
547 makedev ttyV$minor c $major1 $minor $dialout 756 makedev ttyV$minor c $major1 $minor $dialout
548 #makedev cuv$minor c $major2 $minor $dialout 757 #makedev cuv$minor c $major2 $minor $dialout
549 minor=`math minor + 1` 758 minor=`math $minor + 1`
550 done 759 done
551 ;; 760 ;;
552 digi|ttyD) 761 digi|ttyD)
553 major1=`Major ttyD 22` || continue 762 major1=`Major ttyD 22` || continue
554 #major2=`Major cud 23` || continue 763 #major2=`Major cud 23` || continue
555 minor=0 764 minor=0
556 until [ $minor -gt 16 ] # tell me if 16 is wrong 765 until [ $minor -gt 16 ] # tell me if 16 is wrong
557 do 766 do
558 makedev ttyD$minor c $major1 $minor $dialout 767 makedev ttyD$minor c $major1 $minor $dialout
559 #makedev cud$minor c $major2 $minor $dialout 768 #makedev cud$minor c $major2 $minor $dialout
560 minor=`math minor + 1` 769 minor=`math $minor + 1`
561 done 770 done
562 ;; 771 ;;
563 specialix|ttyX) 772 specialix|ttyX)
564 major1=`Major ttyX 32` || continue 773 major1=`Major ttyX 32` || continue
565 #major2=`Major cux 33` || continue 774 #major2=`Major cux 33` || continue
566 minor=0 775 minor=0
567 until [ $minor -gt 16 ] # tell me if 16 is wrong 776 until [ $minor -gt 16 ] # tell me if 16 is wrong
568 do 777 do
569 makedev ttyX$minor c $major1 $minor $dialout 778 makedev ttyX$minor c $major1 $minor $dialout
570 #makedev cux$minor c $major2 $minor $dialout 779 #makedev cux$minor c $major2 $minor $dialout
571 minor=`math minor + 1` 780 minor=`math $minor + 1`
572 done 781 done
573 ;; 782 ;;
574 specialixIO8|ttyW) 783 specialixIO8|ttyW)
575 major1=`Major ttyW 75` || continue 784 major1=`Major ttyW 75` || continue
576 #major2=`Major cuw 76` || continue 785 #major2=`Major cuw 76` || continue
577 minor=0 786 minor=0
578 until [ $minor -gt 16 ] # tell me if 16 is wrong 787 until [ $minor -gt 16 ] # tell me if 16 is wrong
579 do 788 do
580 makedev ttyW$minor c $major1 $minor $dialout 789 makedev ttyW$minor c $major1 $minor $dialout
581 #makedev cuw$minor c $major2 $minor $dialout 790 #makedev cuw$minor c $major2 $minor $dialout
582 minor=`math minor + 1` 791 minor=`math $minor + 1`
583 done 792 done
584 ;; 793 ;;
585 PAM|ttyM) 794 PAM|ttyM)
586 major1=`Major ttyM 79` || continue 795 major1=`Major ttyM 79` || continue
587 #major2=`Major cum 80` || continue 796 #major2=`Major cum 80` || continue
588 minor=0 797 minor=0
589 until [ $minor -gt 16 ] # tell me if 16 is wrong 798 until [ $minor -gt 16 ] # tell me if 16 is wrong
590 do 799 do
591 makedev ttyM$minor c $major1 $minor $dialout 800 makedev ttyM$minor c $major1 $minor $dialout
592 #makedev cum$minor c $major2 $minor $dialout 801 #makedev cum$minor c $major2 $minor $dialout
593 minor=`math minor + 1` 802 minor=`math $minor + 1`
594 done 803 done
595 ;; 804 ;;
596 riscom|ttyL) 805 riscom|ttyL)
597 major=`Major ttyL 48` || continue 806 major=`Major ttyL 48` || continue
598 minor=0 807 minor=0
599 until [ $minor -gt 16 ] # tell me if 16 is wrong 808 until [ $minor -gt 16 ] # tell me if 16 is wrong
600 do 809 do
601 makedev ttyL$minor c $major $minor $dialout 810 makedev ttyL$minor c $major $minor $dialout
602 minor=`math minor + 1` 811 minor=`math $minor + 1`
603 done 812 done
604 ;; 813 ;;
605 computone|ttyF) 814 computone|ttyF)
606 major=`Major ttyF 71` || continue 815 major=`Major ttyF 71` || continue
607 #major2=`Major cuf 72` || continue 816 #major2=`Major cuf 72` || continue
608 minor=0 817 minor=0
609 until [ $minor -gt 255 ] 818 until [ $minor -gt 255 ]
610 do 819 do
611 makedev ttyF$minor c $major $minor $dialout 820 makedev ttyF$minor c $major $minor $dialout
612 #makedev cuf$minor c $major2 $minor $dialout 821 #makedev cuf$minor c $major2 $minor $dialout
613 minor=`math minor + 1` 822 minor=`math $minor + 1`
614 done 823 done
615 major=73 824 major=73
616 for i in 0 4 8 12 825 for i in 0 4 8 12
617 do 826 do
618 makedev ip2ipl$i c $major $i $private 827 makedev ip2ipl$i c $major $i $private
625 minor=0 834 minor=0
626 until [ $minor -gt 4 ] # tell me if 4 is wrong 835 until [ $minor -gt 4 ] # tell me if 4 is wrong
627 do 836 do
628 makedev ttyP$minor c $major $minor $dialout 837 makedev ttyP$minor c $major $minor $dialout
629 #makedev cup$minor c $major2 $minor $dialout 838 #makedev cup$minor c $major2 $minor $dialout
630 minor=`math minor + 1` 839 minor=`math $minor + 1`
631 done 840 done
632 ;; 841 ;;
633 COMX|comx) 842 COMX|comx)
634 major=`Major comx 88` || continue 843 major=`Major comx 88` || continue
635 minor=0 844 minor=0
636 until [ $minor -gt 4 ] # tell me if 4 is wrong 845 until [ $minor -gt 4 ] # tell me if 4 is wrong
637 do 846 do
638 makedev comx$minor c $major $minor $private 847 makedev comx$minor c $major $minor $private
639 minor=`math minor + 1` 848 minor=`math $minor + 1`
640 done 849 done
641 ;; 850 ;;
642 isdnmodem|ttyI) 851 isdnmodem|ttyI)
643 major1=`Major ttyI 43` || continue 852 major1=`Major ttyI 43` || continue
644 #major2=`Major cui 44` || continue 853 #major2=`Major cui 44` || continue
645 minor=0 854 minor=0
646 until [ $minor -gt 63 ] 855 until [ $minor -gt 63 ]
647 do 856 do
648 makedev ttyI$minor c $major1 $minor $dialout 857 makedev ttyI$minor c $major1 $minor $dialout
649 #makedev cui$minor c $major2 $minor $dialout 858 #makedev cui$minor c $major2 $minor $dialout
650 minor=`math minor + 1` 859 minor=`math $minor + 1`
651 done 860 done
652 ;; 861 ;;
653 isdnbri) 862 isdnbri)
654 major=45 863 major=45
655 minor=0 864 minor=0
656 until [ $minor -gt 63 ] 865 until [ $minor -gt 63 ]
657 do 866 do
658 makedev isdn$minor c $major $minor $private 867 makedev isdn$minor c $major $minor $dialout
659 makedev isdnctrl$minor c $major `math $minor + 64` $private 868 makedev isdnctrl$minor c $major `math $minor + 64` $dialout
660 makedev ippp$minor c $major `math $minor + 128` $private 869 makedev ippp$minor c $major `math $minor + 128` $dialout
661 minor=`math minor + 1` 870 minor=`math $minor + 1`
662 done 871 done
663 makedev isdninfo c $major 255 $private 872 makedev isdninfo c $major 255 $private
664 ;; 873 ;;
665 dcbri) 874 dcbri)
666 major=52 875 major=52
667 for i in 0 1 2 3 876 for i in 0 1 2 3
668 do 877 do
669 makedev dcbri$i c $major $i $private 878 makedev dcbri$i c $major $i $dialout
670 done 879 done
671 ;; 880 ;;
672 capi) 881 capi)
673 major=68 882 major=68
674 makedev capi20 c $major 0 $private 883 makedev capi20 c $major 0 $dialout
675 for i in 0 1 2 3 4 5 6 7 8 9 884 for i in 0 1 2 3 4 5 6 7 8 9
676 do 885 do
677 makedev capi20.0$i c $major `math $i + 1` $private 886 makedev capi20.0$i c $major `math $i + 1` $dialout
678 done 887 done
679 for i in 10 11 12 13 14 15 16 17 18 19 888 for i in 10 11 12 13 14 15 16 17 18 19
680 do 889 do
681 makedev capi20.$i c $major `math $i + 1` $private 890 makedev capi20.$i c $major `math $i + 1` $dialout
891 done
892 ;;
893 ubd)
894 major=98
895 minor=0
896 until [ $minor -gt 255 ]
897 do
898 makedev ubd$minor b $major $minor $disk
899 minor=`math $minor + 1`
682 done 900 done
683 ;; 901 ;;
684 fb) 902 fb)
685 for i in 0 1 2 3 4 5 6 7 903 for i in 0 1 2 3 4 5 6 7
686 do 904 do
687 makedev fb$i c 29 `math 32 \* $i` $cons 905 makedev fb$i c 29 `math 32 \* $i` $fb
688 makedev fb${i}current c 29 `math 32 \* $i` $cons 906 makedev fb${i}current c 29 `math 32 \* $i` $fb
689 makedev fb${i}autodetect c 29 `math 32 \* $i + 1` $cons 907 makedev fb${i}autodetect c 29 `math 32 \* $i + 1` $fb
690 done 908 done
691 ;; 909 ;;
692 fb[0-7]) 910 fb[0-7])
693 dev=`suffix $arg fb` 911 dev=`suffix $arg fb`
694 base=`math 32 \* $dev` 912 base=`math 32 \* $dev`
695 makedev fb$dev c 29 $base $cons 913 makedev fb$dev c 29 $base $fb
696 makedev fb${dev}current c 29 $base $cons 914 makedev fb${dev}current c 29 $base $fb
697 makedev fb${dev}autodetect c 29 `math $base + 1` $cons 915 makedev fb${dev}autodetect c 29 `math $base + 1` $fb
698 for i in 0 1 2 3 4 5 6 7 916 for i in 0 1 2 3 4 5 6 7
699 do 917 do
700 makedev fb${dev}user$i c 29 `math $base + 24 + $i` $cons 918 makedev fb${dev}user$i c 29 `math $base + 24 + $i` $fb
701 done 919 done
702 ;; 920 ;;
703 netlink) 921 netlink|tap|tap[0-9]|tap1[0-5])
704 makedev route c 36 0 $coda 922 makedev route c 36 0 $coda
705 makedev skip c 36 0 $coda 923 makedev skip c 36 1 $coda
924 makedev fwmonitor c 36 3 $coda
925 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
926 do
927 makedev tap$i c 36 `math $i + 16` $coda
928 done
706 ;; 929 ;;
707 lp) 930 lp)
708 major=`Major lp 6` || continue 931 major=`Major lp 6` || continue
709 makedev ${arg}0 c $major 0 $printer 932 makedev ${arg}0 c $major 0 $printer
710 makedev ${arg}1 c $major 1 $printer 933 makedev ${arg}1 c $major 1 $printer
726 major=`Major slm 28` || continue 949 major=`Major slm 28` || continue
727 for i in 0 1 2 3 950 for i in 0 1 2 3
728 do 951 do
729 makedev slm c $major $i $printer 952 makedev slm c $major $i $printer
730 done 953 done
954 ;;
955 input)
956 major=`Major pcsp 13` || continue
957 mkdir -p input
958 for i in 0 1 2 3
959 do
960 makedev input/js$i c $major $i $mouse
961 makedev input/mouse$i c $major `math $i + 32` $mouse
962 makedev input/event$i c $major `math $i + 64` $mouse
963 done
964 makedev input/mice c $major 63 $mouse
731 ;; 965 ;;
732 busmice) 966 busmice)
733 major=`Major mouse 10` || continue 967 major=`Major mouse 10` || continue
734 makedev logibm c $major 0 $mouse 968 makedev logibm c $major 0 $mouse
735 makedev psaux c $major 1 $mouse 969 makedev psaux c $major 1 $mouse
741 major=`Major mouse 10` || continue 975 major=`Major mouse 10` || continue
742 makedev amigamouse c $major 4 $mouse 976 makedev amigamouse c $major 4 $mouse
743 makedev atarimouse c $major 5 $mouse 977 makedev atarimouse c $major 5 $mouse
744 makedev amigamouse1 c $major 7 $mouse 978 makedev amigamouse1 c $major 7 $mouse
745 makedev adbmouse c $major 10 $mouse 979 makedev adbmouse c $major 10 $mouse
980 ;;
981 3dfx)
982 major=`Major $arg 107` || continue
983 makedev $arg c $major 0 $video
984 ;;
985 agpgart)
986 major=`Major $arg 10` || continue
987 makedev $arg c $major 175 $video
988 ;;
989 intel_rng)
990 major=`Major $arg 10` || continue
991 makedev $arg c $major 183 $private
992 ;;
993 cpu|microcode)
994 mkdir -p cpu
995 makedev cpu/microcode c 10 184 $private
996 for i in 0 1 2 3
997 do
998 mkdir -p cpu/$i
999 makedev cpu/$i/msr c 202 $i $private
1000 makedev cpu/$i/cpuid c 203 $i $private
1001 done
1002 ;;
1003 ipmi|ipmikcs)
1004 major=`Major ipmikcs 10` || continue
1005 makedev ipmikcs c $major 173 $private
1006 ;;
1007 irda)
1008 for i in 0 1
1009 do
1010 makedev ircomm$i c 161 $i $dialout
1011 makedev irlpt$i c 161 `math $i + 16` $printer
1012 done
746 ;; 1013 ;;
747 misc) 1014 misc)
748 major=`Major mouse 10` || continue 1015 major=`Major mouse 10` || continue
749 makedev logibm c $major 0 $mouse 1016 makedev logibm c $major 0 $mouse
750 makedev psaux c $major 1 $mouse 1017 makedev psaux c $major 1 $mouse
775 makedev hfmodem c $major 145 $mouse 1042 makedev hfmodem c $major 145 $mouse
776 makedev led c $major 151 $mouse 1043 makedev led c $major 151 $mouse
777 makedev mergemem c $major 153 $mouse 1044 makedev mergemem c $major 153 $mouse
778 makedev pmu c $major 154 $mouse 1045 makedev pmu c $major 154 $mouse
779 ;; 1046 ;;
1047 smapi|thinkpad)
1048 major=`Major mouse 10` || continue
1049 makedev smapi c $major 170 $mouse
1050 symlink thinkpad smapi
1051 ;;
780 rtc) 1052 rtc)
781 major=`Major mouse 10` || continue 1053 major=`Major mouse 10` || continue
782 makedev rtc c $major 135 $mouse 1054 makedev rtc c $major 135 $mouse
783 ;; 1055 ;;
1056 efirtc)
1057 major=`Major mouse 10` || continue
1058 makedev efirtc c $major 136 $mouse
1059 ;;
784 js) 1060 js)
785 major=`Major Joystick` || continue 1061 major=`Major Joystick 13` || continue
786 makedev js0 c $major 0 $mouse 1062 for unit in 0 1 2 3
787 makedev js1 c $major 1 $mouse 1063 do
1064 makedev js$unit c $major $unit $readable
1065 makedev djs$unit c $major `math $unit + 128` $readable
1066 done
788 ;; 1067 ;;
789 fd[0-7]-bare) 1068 fd[0-7]-bare)
790 sarg="${arg%-bare}" 1069 sarg="${arg%-bare}"
791 major=`Major fd 2` || continue 1070 major=`Major fd 2` || continue
792 base=`suffix $sarg fd` 1071 base=`suffix $sarg fd`
865 base=`index cd $unit` 1144 base=`index cd $unit`
866 base=`math $base \* 64` 1145 base=`math $base \* 64`
867 makedev hd$unit b $major $base $disk 1146 makedev hd$unit b $major $base $disk
868 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1147 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
869 do 1148 do
870 makedev hd$unit$part b $major `expr $base + $part` $disk 1149 makedev hd$unit$part b $major $(( $base + $part )) $disk
871 done 1150 done
872 ;; 1151 ;;
873 hd[e-f]) 1152 hd[e-f])
874 major=`Major ide2 33` || continue 1153 major=`Major ide2 33` || continue
875 unit=`suffix $arg hd` 1154 unit=`suffix $arg hd`
876 base=`index ef $unit` 1155 base=`index ef $unit`
877 base=`math $base \* 64` 1156 base=`math $base \* 64`
878 makedev hd$unit b $major $base $disk 1157 makedev hd$unit b $major $base $disk
879 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1158 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
880 do 1159 do
881 makedev hd$unit$part b $major `expr $base + $part` $disk 1160 makedev hd$unit$part b $major $(( $base + $part )) $disk
882 done 1161 done
883 ;; 1162 ;;
884 hd[g-h]) 1163 hd[g-h])
885 major=`Major ide3 34` || continue 1164 major=`Major ide3 34` || continue
886 unit=`suffix $arg hd` 1165 unit=`suffix $arg hd`
887 base=`index gh $unit` 1166 base=`index gh $unit`
888 base=`math $base \* 64` 1167 base=`math $base \* 64`
889 makedev hd$unit b $major $base $disk 1168 makedev hd$unit b $major $base $disk
890 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1169 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
891 do 1170 do
892 makedev hd$unit$part b $major `expr $base + $part` $disk 1171 makedev hd$unit$part b $major $(( $base + $part )) $disk
893 done 1172 done
894 ;; 1173 ;;
895 hd[i-j]) 1174 hd[i-j])
896 major=`Major ide4 56` || continue 1175 major=`Major ide4 56` || continue
897 unit=`suffix $arg hd` 1176 unit=`suffix $arg hd`
898 base=`index gh $unit` 1177 base=`index ij $unit`
899 base=`math $base \* 64` 1178 base=`math $base \* 64`
900 makedev hd$unit b $major $base $disk 1179 makedev hd$unit b $major $base $disk
901 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1180 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
902 do 1181 do
903 makedev hd$unit$part b $major `expr $base + $part` $disk 1182 makedev hd$unit$part b $major $(( $base + $part )) $disk
904 done 1183 done
905 ;; 1184 ;;
906 hd[k-l]) 1185 hd[k-l])
907 major=`Major ide4 57` || continue 1186 major=`Major ide5 57` || continue
908 unit=`suffix $arg hd` 1187 unit=`suffix $arg hd`
909 base=`index gh $unit` 1188 base=`index kl $unit`
910 base=`math $base \* 64` 1189 base=`math $base \* 64`
911 makedev hd$unit b $major $base $disk 1190 makedev hd$unit b $major $base $disk
912 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1191 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
913 do 1192 do
914 makedev hd$unit$part b $major `expr $base + $part` $disk 1193 makedev hd$unit$part b $major $(( $base + $part )) $disk
915 done 1194 done
916 ;; 1195 ;;
917 ht) 1196 ht0)
918 major=`Major ht0 37` || continue 1197 major=`Major ht0 37` || continue
919 # Only one IDE tape drive is currently supported; ht0. 1198 # Only one IDE tape drive is currently supported; ht0.
920 makedev ht0 c $major 0 $tape
921 makedev ht0 c $major 0 $tape 1199 makedev ht0 c $major 0 $tape
922 makedev nht0 c $major 128 $tape 1200 makedev nht0 c $major 128 $tape
923 ;; 1201 ;;
924 pt) 1202 pt)
925 major=`Major pt 96` || continue 1203 major=`Major pt 96` || continue
935 base=`index abcd $unit` 1213 base=`index abcd $unit`
936 base=`math $base \* 64` 1214 base=`math $base \* 64`
937 makedev xd$unit b $major $base $disk 1215 makedev xd$unit b $major $base $disk
938 for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16 17 18 19 20 1216 for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16 17 18 19 20
939 do 1217 do
940 makedev xd$unit$part b $major `expr $base + $part` $disk 1218 makedev xd$unit$part b $major $(( $base + $part )) $disk
941 done 1219 done
942 ;; 1220 ;;
943 sd[a-z]) 1221 sd[a-z])
944 major=`Major sd 8` || continue 1222 major=`Major sd 8` || continue
945 unit=`suffix $arg sd` 1223 unit=`suffix $arg sd`
946 base=`index abcdefghijklmnopqrstuvwxyz $unit` 1224 base=`index abcdefghijklmnopqrstuvwxyz $unit`
947 base=`math $base \* 16` 1225 base=$(( $base * 16 ))
948 if [ $base -lt 256 ]; then 1226 if [ $base -lt 256 ]; then
949 major=8 1227 major=8
950 else 1228 else
951 major=65 1229 major=65
952 base=`math $base \- 256` 1230 base=$(( $base - 256 ))
953 fi 1231 fi
954 makedev sd$unit b $major $base $disk 1232 makedev sd$unit b $major $base $disk
955 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1233 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
956 do 1234 do
957 minor=`expr $base + $part` 1235 minor=$(( $base + $part ))
958 makedev sd$unit$part b $major $minor $disk 1236 makedev sd$unit$part b $major $minor $disk
959 done 1237 done
960 ;; 1238 ;;
961 sd[a-d][a-z]) 1239 sd[a-d][a-z])
962 unit=`suffix $arg sd` 1240 unit=`suffix $arg sd`
975 exit 0 1253 exit 0
976 fi 1254 fi
977 makedev sd$unit b $major $base $disk 1255 makedev sd$unit b $major $base $disk
978 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1256 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
979 do 1257 do
980 minor=`expr $base + $part` 1258 minor=$(( $base + $part ))
981 makedev sd$unit$part b $major $minor $disk 1259 makedev sd$unit$part b $major $minor $disk
982 done 1260 done
983 ;; 1261 ;;
1262 dasd[a-z])
1263 major=`Major dasd 94` || continue
1264 unit=`suffix $arg dasd`
1265 base=`index abcdefghijklmnopqrstuvwxyz $unit`
1266 base=$(( $base * 4 ))
1267 if [ $base -lt 256 ]; then
1268 major=94
1269 else
1270 major=65
1271 base=$(( $base - 256 ))
1272 fi
1273 makedev dasd$unit b $major $base $disk
1274 # Not yet implemented. (Feb. 8, 2001)
1275 # for part in 1 2 3
1276 for part in 1
1277 do
1278 minor=$(( $base + $part ))
1279 makedev dasd$unit$part b $major $minor $disk
1280 done
1281 ;;
984 ad[a-p]) 1282 ad[a-p])
985 major=`Major ad 28` || continue 1283 major=`Major ad 28` || continue
986 unit=`suffix $arg ad` 1284 unit=`suffix $arg ad`
987 base=`index abcdefghijklmnop $unit` 1285 base=`index abcdefghijklmnop $unit`
988 base=`math $base \* 16` 1286 base=`math $base \* 16`
989 makedev ad$unit b $major $base $disk 1287 makedev ad$unit b $major $base $disk
990 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1288 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
991 do 1289 do
992 minor=`expr $base + $part` 1290 minor=$(( $base + $part ))
993 makedev ad$unit$part b $major $minor $disk 1291 makedev ad$unit$part b $major $minor $disk
994 done 1292 done
995 ;; 1293 ;;
996 dac960) 1294 dac960)
1295 for ctr in 0 1 2 3 4 5 6 7
1296 do
1297 $0 $opts dac960.$ctr
1298 done
1299 ;;
1300 dac960.[0-7])
997 [ -d rd ] || { 1301 [ -d rd ] || {
998 mkdir rd 1302 mkdir rd
999 chown root.root rd 1303 chown root.root rd
1000 chmod 755 rd 1304 chmod 755 rd
1001 } 1305 }
1002 for ctr in 0 1 2 3 4 5 6 7 1306 unit=`suffix $arg dac960.`
1003 do
1004 major=`math 48 + $ctr` 1307 major=`math 48 + $unit`
1005 minor=0 1308 minor=0
1006 for ld in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \ 1309 for ld in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
1007 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1310 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1008 do 1311 do
1009 makedev rd/c${ctr}d${ld} b $major $minor $disk 1312 makedev rd/c${unit}d${ld} b $major $minor $disk
1010 minor=`math minor + 1` 1313 minor=`math $minor + 1`
1011 for part in 1 2 3 4 5 6 7 1314 for part in 1 2 3 4 5 6 7
1012 do 1315 do
1013 makedev rd/c${ctr}d${ld}p$part b $major $minor $disk 1316 makedev rd/c${unit}d${ld}p$part b $major $minor $disk
1014 minor=`math minor + 1` 1317 minor=`math $minor + 1`
1015 done 1318 done
1016 done 1319 done
1320 ;;
1321 ataraid)
1322 for ctr in 0 1 2 # 3 4 5 6 7
1017 done 1323 do
1324 $0 $opts ataraid.$ctr
1325 done
1326 ;;
1327 ataraid.[0-7])
1328 [ -d ataraid ] || {
1329 mkdir ataraid
1330 chown root.root ataraid
1331 chmod 755 ataraid
1332 }
1333 unit=`suffix $arg ataraid.`
1334 major=114
1335 minor=`math $unit \* 16`
1336 makedev ataraid/d${unit} b $major $minor $disk
1337 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1338 do
1339 minor=`math $minor + 1`
1340 makedev ataraid/d${unit}p$part b $major $minor $disk
1341 done
1018 ;; 1342 ;;
1019 ida) 1343 ida)
1344 for ctr in 0 1 2 # 3 4 5 6 7
1345 do
1346 $0 $opts ida.$ctr
1347 done
1348 ;;
1349 ida.[0-7])
1020 [ -d ida ] || { 1350 [ -d ida ] || {
1021 mkdir ida 1351 mkdir ida
1022 chown root.root ida 1352 chown root.root ida
1023 chmod 755 ida 1353 chmod 755 ida
1024 } 1354 }
1355 unit=`suffix $arg ida.`
1356 major=`math 72 + $unit`
1357 minor=0
1358 for ld in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1359 do
1360 makedev ida/c${unit}d${ld} b $major $minor $disk
1361 minor=`math $minor + 1`
1362 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1363 do
1364 makedev ida/c${unit}d${ld}p$part b $major $minor $disk
1365 minor=`math $minor + 1`
1366 done
1367 done
1368 ;;
1369 cciss)
1025 for ctr in 0 1 2 # 3 4 5 6 7 1370 for ctr in 0 1 2 # 3 4 5 6 7
1026 do 1371 do
1027 major=`math 72 + $ctr` 1372 $0 $opts cciss.$ctr
1373 done
1374 ;;
1375 cciss.[0-7])
1376 [ -d cciss ] || {
1377 mkdir cciss
1378 chown root.root cciss
1379 chmod 755 cciss
1380 }
1381 unit=`suffix $arg cciss.`
1382 major=`math 104 + $unit`
1028 minor=0 1383 minor=0
1029 for ld in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1384 for ld in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1385 do
1386 makedev cciss/c${unit}d${ld} b $major $minor $disk
1387 minor=`math $minor + 1`
1388 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1030 do 1389 do
1031 makedev ida/c${ctr}d${ld} b $major $minor $disk 1390 makedev cciss/c${unit}d${ld}p$part b $major $minor $disk
1032 minor=`math minor + 1` 1391 minor=`math $minor + 1`
1033 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1034 do
1035 makedev ida/c${ctr}d${ld}p$part b $major $minor $disk
1036 minor=`math minor + 1`
1037 done
1038 done 1392 done
1039 done 1393 done
1040 ;; 1394 ;;
1041 rom) 1395 rom)
1042 major=`Major rom 31` 1396 major=`Major rom 31`
1046 makedev rrom$i b $major `math $i +8` $disk 1400 makedev rrom$i b $major `math $i +8` $disk
1047 makedev flash$i b $major `math $i +16` $disk 1401 makedev flash$i b $major `math $i +16` $disk
1048 makedev rflash$i b $major `math $i +24` $disk 1402 makedev rflash$i b $major `math $i +24` $disk
1049 done 1403 done
1050 ;; 1404 ;;
1051 nb) 1405 nb[0-7])
1052 major=`Major nbd 43` || continue 1406 major=`Major nbd 43` || continue
1053 minor=0 1407 minor=`suffix $arg nb`
1054 while [ $minor -lt 128 ] ; do
1055 makedev nb$minor b $major $minor $disk 1408 makedev nb$minor b $major $minor $disk
1056 minor=`math $minor + 1`
1057 done
1058 ;; 1409 ;;
1059 loop) 1410 loop)
1060 major=`Major loop 7` || continue
1061 for part in 0 1 2 3 4 5 6 7 1411 for part in 0 1 2 3 4 5 6 7
1062 do 1412 do
1063 makedev loop$part b $major $part $disk 1413 makedev loop$part b 7 $part $disk
1064 done 1414 done
1065 ;; 1415 ;;
1066 md) 1416 md)
1067 major=`Major md` || continue 1417 major=`Major md 9` || continue
1068 for part in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1418 for part in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1069 do 1419 do
1070 makedev md$part b $major $part $disk 1420 makedev md$part b $major $part $disk
1071 done 1421 done
1072 ;; 1422 ;;
1097 makedev tpqic150 c $major 9 $tape 1447 makedev tpqic150 c $major 9 $tape
1098 makedev rmt8 c $major 6 $tape 1448 makedev rmt8 c $major 6 $tape
1099 makedev rmt16 c $major 8 $tape 1449 makedev rmt16 c $major 8 $tape
1100 makedev tape-d c $major 136 $tape 1450 makedev tape-d c $major 136 $tape
1101 makedev tape-reset c $major 255 $tape 1451 makedev tape-reset c $major 255 $tape
1102 major=`Major qft 27` 1452 $0 $opts qft
1103 for i in 0 1 2 3
1104 do
1105 makedev qft$i c $major $i $tape
1106 makedev nqft$i c $major `math $i + 4` $tape
1107 makedev zqft$i c $major `math $i + 16` $tape
1108 makedev nzqft$i c $major `math $i + 20` $tape
1109 makedev rawqft$i c $major `math $i + 32` $tape
1110 makedev nrawqft$i c $major `math $i + 36` $tape
1111 done
1112 ;; 1453 ;;
1113 ftape) 1454 ftape)
1114 major=`Major mt 27` || continue 1455 major=`Major qft 27` || continue
1115 for unit in 0 1 2 3 1456 for unit in 0 1 2 3
1116 do 1457 do
1117 makedev rft$unit c $major $unit $tape 1458 makedev qft$unit c $major $unit $tape
1118 makedev nrft$unit c $major `math $unit + 4` $tape 1459 makedev nqft$unit c $major `math $unit + 4` $tape
1460 makedev zqft$unit c $major `math $unit + 16` $tape
1461 makedev nzqft$unit c $major `math $unit + 20` $tape
1462 makedev rawqft$unit c $major `math $unit + 32` $tape
1463 makedev nrawqft$unit c $major `math $unit + 36` $tape
1119 done 1464 done
1120 symlink ftape rft0 1465 symlink ftape qft0
1121 symlink nftape nrft0 1466 symlink nftape nqft0
1122 ;; 1467 ;;
1123 scd|scd-all) 1468 sr|scd|scd-all)
1124 major=`Major sr 11` || continue 1469 major=`Major sr 11` || continue
1125 for unit in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1470 for unit in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1126 do 1471 do
1127 makedev scd$unit b $major $unit $cdrom 1472 makedev scd$unit b $major $unit $cdrom
1473 symlink sr$unit scd$unit
1474 done
1475 ;;
1476 pktcdvd)
1477 major=97
1478 for unit in 0 1 2 3
1479 do
1480 makedev pktcdvd$unit b $major $unit $cdrom
1128 done 1481 done
1129 ;; 1482 ;;
1130 cfs0) 1483 cfs0)
1131 makedev cfs0 c 67 0 $coda 1484 makedev cfs0 c 67 0 $coda
1132 ;; 1485 ;;
1133 scd[0-9]|scd[0-1][0-9]) 1486 scd[0-9]|scd[0-1][0-9])
1134 major=`Major sr 11` || continue 1487 major=`Major sr 11` || continue
1135 unit=`suffix $arg scd` 1488 unit=`suffix $arg scd`
1136 makedev scd$unit b $major $unit $cdrom 1489 makedev scd$unit b $major $unit $cdrom
1490 ln -f scd$unit sr$unit
1137 ;; 1491 ;;
1138 ttyI[0-9]|ttyI[1-5][0-9]|ttyI[6][0-3]) 1492 ttyI[0-9]|ttyI[1-5][0-9]|ttyI[6][0-3])
1139 major=43 1493 major=43
1140 unit=`suffix $arg ttyI` 1494 unit=`suffix $arg ttyI`
1141 makedev ttyI$unit c $major $unit $dialout 1495 makedev ttyI$unit c $major $unit $dialout
1496 ;;
1497 ppp)
1498 major=108
1499 makedev ppp c $major 0 $dip
1142 ;; 1500 ;;
1143 ippp[0-9]|ippp[1-5][0-9]|ippp[6][0-3]) 1501 ippp[0-9]|ippp[1-5][0-9]|ippp[6][0-3])
1144 major=45 1502 major=45
1145 unit=`suffix $arg ippp` 1503 unit=`suffix $arg ippp`
1146 minor=`math $unit + 128` 1504 minor=`math $unit + 128`
1157 unit=`suffix $arg isdnctrl` 1515 unit=`suffix $arg isdnctrl`
1158 minor=`math $unit + 64` 1516 minor=`math $unit + 64`
1159 makedev isdnctrl$unit c $major $minor $dialout 1517 makedev isdnctrl$unit c $major $minor $dialout
1160 ;; 1518 ;;
1161 isdninfo) 1519 isdninfo)
1162 makedev isdninfo c 45 255 $dialout 1520 makedev isdninfo c 45 255 $private
1163 ;; 1521 ;;
1164 isdn-tty) 1522 isdn-tty)
1165 major=43 1523 major=43
1166 for unit in 0 1 2 3 4 5 6 7 1524 for unit in 0 1 2 3 4 5 6 7
1167 do 1525 do
1183 makedev ippp$unit c 45 `math $unit + 128` $dialout 1541 makedev ippp$unit c 45 `math $unit + 128` $dialout
1184 done 1542 done
1185 makedev isdninfo c 45 255 $dialout 1543 makedev isdninfo c 45 255 $dialout
1186 ;; 1544 ;;
1187 sonycd) 1545 sonycd)
1188 major=`Major cdu31a` || continue 1546 major=`Major sonycd 15` || continue
1189 makedev $arg b $major 0 $cdrom 1547 makedev $arg b $major 0 $cdrom
1190 ;; 1548 ;;
1191 mcd) 1549 mcd)
1192 major=`Major mcd 23` || continue 1550 major=`Major mcd 23` || continue
1193 makedev $arg b $major 0 $cdrom 1551 makedev $arg b $major 0 $cdrom
1194 ;; 1552 ;;
1195 mcdx) 1553 mcdx|mcdx[0-4])
1196 major=`Major mcdx 20` || continue 1554 major=`Major $arg 20` || continue
1555 for unit in 0 1 2 3 4
1556 do
1197 makedev $arg b $major 0 $cdrom 1557 makedev mcdx$unit b $major $unit $cdrom
1558 done
1559 test -r mcdx || symlink mcdx mcdx0
1198 ;; 1560 ;;
1199 cdu535) 1561 cdu535)
1200 makedev $arg b 24 0 $cdrom 1562 makedev $arg b 24 0 $cdrom
1201 ;; 1563 ;;
1202 lmscd) 1564 lmscd)
1203 makedev $arg b 24 0 $cdrom 1565 makedev $arg b 24 0 $cdrom
1204 ;; 1566 ;;
1205 sbpcd|sbpcd[123]) 1567 sbpcd|sbpcd[123])
1206 major=`Major $arg` || continue 1568 major=`Major $arg 25` || continue
1207 base=`suffix ${arg}0 sbpcd` 1569 base=`suffix ${arg}0 sbpcd`
1208 # base=`expr ${arg}0 : "sbpcd\(.\)"`
1209 for minor in 0 1 2 3 1570 for minor in 0 1 2 3
1210 do 1571 do
1211 # XXX 1572 # XXX
1212 unit=`expr substr 0123456789abcdef \( $base \* 4 + $minor + 1 \) 1` 1573 unit=$(substr 0123456789abcdef $(( $base * 4 + $minor + 1 )) )
1213 makedev sbpcd$unit b $major $minor $cdrom 1574 makedev sbpcd$unit b $major $minor $cdrom
1214 done 1575 done
1215 [ $arg = sbpcd ] && symlink $arg ${arg}0 1576 [ $arg = sbpcd ] && symlink $arg ${arg}0
1216 ;; 1577 ;;
1217 aztcd) 1578 aztcd)
1218 major=`Major $arg` || continue 1579 major=`Major $arg 29` || continue
1219 makedev ${arg}0 b $major 0 $cdrom 1580 makedev ${arg}0 b $major 0 $cdrom
1581 ;;
1582 cm206cd)
1583 major=`Major $arg 30` || continue
1584 makedev ${arg}0 b $major 0 $cdrom
1585 ;;
1586 gscd)
1587 major=`Major $arg 16` || continue
1588 makedev ${arg}0 b $major 0 $cdrom
1589 ;;
1590 pcd)
1591 for unit in 0 1 2 3
1592 do
1593 makedev pcd$unit b 46 $unit $cdrom
1594 done
1220 ;; 1595 ;;
1221 bpcd) 1596 bpcd)
1222 makedev $arg b 41 0 $cdrom 1597 makedev $arg b 41 0 $cdrom
1223 ;; 1598 ;;
1224 optcd) 1599 optcd)
1235 ;; 1610 ;;
1236 logiscan) 1611 logiscan)
1237 major=`Major logiscan` || continue 1612 major=`Major logiscan` || continue
1238 makedev $arg c $major 0 $scanner 1613 makedev $arg c $major 0 $scanner
1239 ;; 1614 ;;
1615 toshiba)
1616 major=`Major $arg 10` || continue
1617 makedev $arg c $major 181 root root 0666
1618 ;;
1240 m105scan) 1619 m105scan)
1241 major=`Major m105` || continue 1620 major=`Major m105` || continue
1242 makedev $arg c $major 0 $scanner 1621 makedev $arg c $major 0 $scanner
1243 ;; 1622 ;;
1244 ac4096) 1623 ac4096)
1246 makedev $arg c $major 0 $scanner 1625 makedev $arg c $major 0 $scanner
1247 ;; 1626 ;;
1248 audio) 1627 audio)
1249 major=`Major sound 14` 1628 major=`Major sound 14`
1250 makedev mixer c $major 0 $audio 1629 makedev mixer c $major 0 $audio
1630 makedev mixer1 c $major 16 $audio
1631 makedev mixer2 c $major 32 $audio
1632 makedev mixer3 c $major 48 $audio
1251 makedev sequencer c $major 1 $audio 1633 makedev sequencer c $major 1 $audio
1252 makedev midi00 c $major 2 $audio 1634 makedev midi00 c $major 2 $audio
1253 makedev dsp c $major 3 $audio
1254 makedev audio c $major 4 $audio
1255 makedev sndstat c $major 6 $audio
1256# makedev sequencer2 c $major 8 $audio
1257 makedev mixer1 c $major 16 $audio
1258# makedev patmgr0 c $major 17 $audio
1259 makedev midi01 c $major 18 $audio 1635 makedev midi01 c $major 18 $audio
1260 makedev dsp1 c $major 19 $audio
1261 makedev audio1 c $major 20 $audio
1262# makedev patmgr1 c $major 33 $audio
1263 makedev midi02 c $major 34 $audio 1636 makedev midi02 c $major 34 $audio
1264 makedev midi03 c $major 50 $audio 1637 makedev midi03 c $major 50 $audio
1638 makedev dsp c $major 3 $audio
1639 makedev dsp1 c $major 19 $audio
1640 makedev dsp2 c $major 35 $audio
1641 makedev dsp3 c $major 51 $audio
1642 makedev audio c $major 4 $audio
1643 makedev audio1 c $major 20 $audio
1644 makedev audio2 c $major 36 $audio
1645 makedev audio3 c $major 52 $audio
1646 makedev sndstat c $major 6 $audio
1647 makedev audioctl c $major 7 $audio
1265 major=31 1648 major=31
1266 makedev mpu401data c $major 0 $audio 1649 makedev mpu401data c $major 0 $audio
1267 makedev mpu401stat c $major 1 $audio 1650 makedev mpu401stat c $major 1 $audio
1268 major=35 1651 major=35
1269 for i in 0 1 2 3 1652 for i in 0 1 2 3
1270 do 1653 do
1271 makedev midi$i c $major $i $audio 1654 makedev midi$i c $major $i $audio
1272 makedev rmidi$i c $major `math $i + 64` $audio 1655 makedev rmidi$i c $major `math $i + 64` $audio
1273 makedev smtpe$i c $major `math $i + 128` $audio 1656 makedev smpte$i c $major `math $i + 128` $audio
1274 done 1657 done
1275 ;; 1658 ;;
1276 pcaudio) 1659 pcaudio)
1277 major=`Major pcsp` || continue 1660 major=`Major pcsp 13` || continue
1278 makedev pcmixer c $major 0 $audio 1661 makedev pcmixer c $major 0 $audio
1279 makedev pcsp c $major 3 $audio 1662 makedev pcsp c $major 3 $audio
1280 makedev pcaudio c $major 4 $audio 1663 makedev pcaudio c $major 4 $audio
1281 ;; 1664 ;;
1282 video|video4linux|v4l|radio) 1665 video|video4linux|v4l|radio)
1287 do 1670 do
1288 makedev video$minor c $major $minor $video 1671 makedev video$minor c $major $minor $video
1289 makedev radio$minor c $major `math $minor + 64` $video 1672 makedev radio$minor c $major `math $minor + 64` $video
1290 minor=`math $minor + 1` 1673 minor=`math $minor + 1`
1291 done 1674 done
1675 symlink radio radio0
1292 minor=0 1676 minor=0
1293 until [ $minor -gt 31 ] 1677 until [ $minor -gt 31 ]
1294 do 1678 do
1295 makedev vtx$minor c $major `math $minor + 192` $video 1679 makedev vtx$minor c $major `math $minor + 192` $video
1296 makedev vbi$minor c $major `math $minor + 224` $video 1680 makedev vbi$minor c $major `math $minor + 224` $video
1297 minor=`math $minor + 1` 1681 minor=`math $minor + 1`
1298 done 1682 done
1299 symlink video video0 1683 symlink video video0
1684 symlink vbi vbi0
1300 major=82 1685 major=82
1301 minor=0 1686 minor=0
1302 until [ $minor -gt 1 ] 1687 until [ $minor -gt 1 ]
1303 do 1688 do
1304 makedev winradio$minor c $major $minor $video 1689 makedev winradio$minor c $major $minor $video
1307 major=83 1692 major=83
1308 makedev vtx c $major 0 $video 1693 makedev vtx c $major 0 $video
1309 makedev vttuner c $major 16 $video 1694 makedev vttuner c $major 16 $video
1310 ;; 1695 ;;
1311 i2c) 1696 i2c)
1697 # making it possible to create an arbitrary number of i2c
1698 # devices might be good, but 8 should suffice for now
1312 major=`Major i2c 89` || continue 1699 major=`Major i2c 89` || continue
1313 minor=0 1700 minor=0
1314 until [ $minor -gt 1 ] # tell me if 1 is wrong... 1701 until [ $minor -gt 7 ]
1315 do 1702 do
1316 makedev i2c$minor c $major $minor $private 1703 makedev i2c-$minor c $major $minor $private
1317 minor=`math $minor + 1` 1704 minor=`math $minor + 1`
1318 done 1705 done
1319 ;; 1706 ;;
1320 tlk) 1707 tlk)
1321 major=102 1708 major=102
1363 symlink stdin fd/0 1750 symlink stdin fd/0
1364 symlink stdout fd/1 1751 symlink stdout fd/1
1365 symlink stderr fd/2 1752 symlink stderr fd/2
1366 ;; 1753 ;;
1367 ibcs2) 1754 ibcs2)
1368 major=`Major ibcs2` || continue 1755 major=`Major ibcs2 30` || continue
1369 makedev socksys c $major 0 $ibcs2 1756 makedev socksys c $major 0 $ibcs2
1370 symlink nfsd socksys 1757 symlink nfsd socksys
1371 makedev spx c $major 1 $ibcs2 1758 makedev spx c $major 1 $ibcs2
1372 symlink X0R null 1759 symlink X0R null
1373 ;; 1760 ;;
1389 ;; 1776 ;;
1390 qng) 1777 qng)
1391 makedev qng c 77 0 $private 1778 makedev qng c 77 0 $private
1392 ;; 1779 ;;
1393 apm) 1780 apm)
1394 major=`Major apm_bios` || continue 1781 major=`Major mouse 10` || continue
1395 makedev $arg c $major 0 $system 1782 makedev apm_bios c $major 134 $mouse
1396 ;; 1783 ;;
1397 dcf) 1784 dcf)
1398 major=`Major dcf` || continue 1785 major=`Major dcf` || continue
1399 makedev $arg c $major 0 $system 1786 makedev $arg c $major 0 $system
1400 ;; 1787 ;;
1405 ipsec) 1792 ipsec)
1406 # For the Free S/WAN (http://www.xs4all.nl/~freeswan/) 1793 # For the Free S/WAN (http://www.xs4all.nl/~freeswan/)
1407 # implementation of IPSEC 1794 # implementation of IPSEC
1408 makedev ipsec c 36 10 $ipsec 1795 makedev ipsec c 36 10 $ipsec
1409 ;; 1796 ;;
1797 comedi)
1798 major=98
1799 for minor in 0 1 2 3
1800 do
1801 makedev comedi$minor c $major $minor $public
1802 done
1803 ;;
1804 usb)
1805 mkdir -p usb
1806 major=180
1807 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1808 do
1809 makedev usb/lp$i c $major $i $printer
1810 makedev usb/mouse$i c $major `math $i + 16` $mouse
1811 makedev usb/ez$i c $major `math $i + 32` $system
1812 makedev usb/scanner$i c $major `math $i + 48` $scanner
1813 makedev ttyACM$i c 166 $i $dialout
1814 makedev ttyUSB$i c 188 $i $dialout
1815 done
1816 makedev usb/rio500 c $major 64 $audio
1817 ;;
1818 paride)
1819 major=45
1820 for unit in a b c d
1821 do
1822 base=`index abcd $unit`
1823 base=`math $base \* 16`
1824 makedev pd$unit b $major $base $disk
1825 for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1826 do
1827 makedev pd$unit$part b $major $(( $base + $part )) $disk
1828 done
1829 done
1830 for i in 0 1 2 3
1831 do
1832 makedev pcd$i b 46 $i $cdrom
1833 makedev pf$i b 47 $i $floppy
1834 done
1835 ;;
1410 update) 1836 update)
1411 if [ ! "$devices" ] 1837 if [ ! "$devices" ]
1412 then 1838 then
1413 echo "$0: don't appear to have any devices" >&2 1839 echo "$0: don't appear to have any devices" >&2
1414 continue 1840 continue
1434 elif [ "$now" != $major ] 1860 elif [ "$now" != $major ]
1435 then 1861 then
1436 create="$create "`cvt $device` 1862 create="$create "`cvt $device`
1437 fi 1863 fi
1438 devs=`strip " $devs " $device` 1864 devs=`strip " $devs " $device`
1439 # devs=`expr "$devs" : "\(.*\) $device"``expr "$devs" : ".* $device\(.*\)"`
1440 done 1865 done
1441 exec 3<&- 1866 exec 3<&-
1442 fi 1867 fi
1443 create="$create "`cvt $devs` 1868 create="$create "`cvt $devs`
1444 [ "$delete" != "" ] && $0 $opts -d $delete 1869 [ "$delete" != "" ] && $0 $opts -d $delete

Legend:
Removed from v.333  
changed lines
  Added in v.334

  ViewVC Help
Powered by ViewVC 1.1.20