head 1.51; access; symbols cjep_sun2x:1.51.0.46 cjep_sun2x-base:1.51 cjep_staticlib_x-base1:1.51 cjep_staticlib_x:1.51.0.44 cjep_staticlib_x-base:1.51 phil-wifi-20200421:1.51 phil-wifi-20200411:1.51 phil-wifi-20200406:1.51 pgoyette-compat-merge-20190127:1.51 pgoyette-compat-20190127:1.51 pgoyette-compat-20190118:1.51 pgoyette-compat-1226:1.51 pgoyette-compat-1126:1.51 pgoyette-compat-1020:1.51 pgoyette-compat-0930:1.51 pgoyette-compat-0906:1.51 pgoyette-compat-0728:1.51 pgoyette-compat-0625:1.51 pgoyette-compat-0521:1.51 pgoyette-compat-0502:1.51 pgoyette-compat-0422:1.51 pgoyette-compat-0415:1.51 pgoyette-compat-0407:1.51 pgoyette-compat-0330:1.51 pgoyette-compat-0322:1.51 pgoyette-compat-0315:1.51 pgoyette-compat:1.51.0.42 pgoyette-compat-base:1.51 perseant-stdc-iso10646:1.51.0.40 perseant-stdc-iso10646-base:1.51 prg-localcount2-base3:1.51 prg-localcount2-base2:1.51 prg-localcount2-base1:1.51 prg-localcount2:1.51.0.38 prg-localcount2-base:1.51 pgoyette-localcount-20170426:1.51 bouyer-socketcan-base1:1.51 pgoyette-localcount-20170320:1.51 bouyer-socketcan:1.51.0.36 bouyer-socketcan-base:1.51 pgoyette-localcount-20170107:1.51 pgoyette-localcount-20161104:1.51 localcount-20160914:1.51 pgoyette-localcount-20160806:1.51 pgoyette-localcount-20160726:1.51 pgoyette-localcount:1.51.0.34 pgoyette-localcount-base:1.51 netbsd-5-2-3-RELEASE:1.51 netbsd-5-1-5-RELEASE:1.51 yamt-pagecache-base9:1.51 yamt-pagecache-tag8:1.51 tls-earlyentropy:1.51.0.30 tls-earlyentropy-base:1.51 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.51 riastradh-drm2-base3:1.51 netbsd-5-2-2-RELEASE:1.51 netbsd-5-1-4-RELEASE:1.51 netbsd-5-2-1-RELEASE:1.51 netbsd-5-1-3-RELEASE:1.51 agc-symver:1.51.0.32 agc-symver-base:1.51 tls-maxphys-base:1.51 yamt-pagecache-base8:1.51 netbsd-5-2:1.51.0.28 yamt-pagecache-base7:1.51 netbsd-5-2-RELEASE:1.51 netbsd-5-2-RC1:1.51 yamt-pagecache-base6:1.51 yamt-pagecache-base5:1.51 yamt-pagecache-base4:1.51 netbsd-5-1-2-RELEASE:1.51 netbsd-5-1-1-RELEASE:1.51 yamt-pagecache-base3:1.51 yamt-pagecache-base2:1.51 yamt-pagecache:1.51.0.26 yamt-pagecache-base:1.51 bouyer-quota2-nbase:1.51 bouyer-quota2:1.51.0.24 bouyer-quota2-base:1.51 matt-nb5-pq3:1.51.0.22 matt-nb5-pq3-base:1.51 netbsd-5-1:1.51.0.20 netbsd-5-1-RELEASE:1.51 netbsd-5-1-RC4:1.51 netbsd-5-1-RC3:1.51 netbsd-5-1-RC2:1.51 netbsd-5-1-RC1:1.51 netbsd-5-0-2-RELEASE:1.51 netbsd-5-0-1-RELEASE:1.51 jym-xensuspend-nbase:1.51 netbsd-5-0:1.51.0.18 netbsd-5-0-RELEASE:1.51 netbsd-5-0-RC4:1.51 netbsd-5-0-RC3:1.51 netbsd-5-0-RC2:1.51 jym-xensuspend:1.51.0.16 jym-xensuspend-base:1.51 netbsd-5-0-RC1:1.51 mjf-devfs2-base2:1.51 netbsd-5:1.51.0.14 netbsd-5-base:1.51 yamt-pf42-base4:1.51 yamt-pf42-base3:1.51 hpcarm-cleanup-nbase:1.51 yamt-pf42-base2:1.51 yamt-pf42:1.51.0.12 yamt-pf42-base:1.51 mjf-devfs2:1.51.0.10 mjf-devfs2-base:1.51 keiichi-mipv6:1.51.0.8 keiichi-mipv6-base:1.51 mjf-devfs:1.51.0.6 mjf-devfs-base:1.51 cube-autoconf:1.51.0.4 cube-autoconf-base:1.51 hpcarm-cleanup:1.51.0.2 hpcarm-cleanup-base:1.51 netbsd-1-6-PATCH002-RELEASE:1.36.2.1 netbsd-1-6-PATCH002:1.36.2.1 netbsd-1-6-PATCH002-RC4:1.36.2.1 netbsd-1-6-PATCH002-RC3:1.36.2.1 netbsd-1-6-PATCH002-RC2:1.36.2.1 netbsd-1-6-PATCH002-RC1:1.36.2.1 unifiedMKDEV-pre:1.50 netbsd-1-6-PATCH001:1.36.2.1 netbsd-1-6-PATCH001-RELEASE:1.36.2.1 netbsd-1-6-PATCH001-RC3:1.36.2.1 netbsd-1-6-PATCH001-RC2:1.36.2.1 netbsd-1-6-PATCH001-RC1:1.36.2.1 fvdl_fs64_base:1.41 netbsd-1-6-RELEASE:1.36.2.1 netbsd-1-6-RC3:1.36.2.1 netbsd-1-6-RC2:1.36.2.1 netbsd-1-6-RC1:1.36.2.1 netbsd-1-6:1.36.0.2 netbsd-1-6-base:1.36 netbsd-1-5-PATCH003:1.24.4.1 netbsd-1-5-PATCH002:1.24.4.1 netbsd-1-5-PATCH001:1.24.4.1 netbsd-1-5-RELEASE:1.24.4.1 netbsd-1-5-BETA2:1.24.4.1 netbsd-1-5-BETA:1.24.4.1 netbsd-1-4-PATCH003:1.20 netbsd-1-5-ALPHA2:1.24.4.1 netbsd-1-5:1.24.0.4 netbsd-1-5-base:1.24 minoura-xpg4dl:1.24.0.2 minoura-xpg4dl-base:1.24 netbsd-1-4-PATCH002:1.20 wrstuden-devbsize-19991221:1.24 wrstuden-devbsize:1.21.0.2 wrstuden-devbsize-base:1.24 comdex-fall-1999:1.23.0.2 comdex-fall-1999-base:1.23 netbsd-1-4-PATCH001:1.20 netbsd-1-4-RELEASE:1.20 netbsd-1-4:1.20.0.2 netbsd-1-4-base:1.20 netbsd-1-3-PATCH003:1.11.2.2 netbsd-1-3-PATCH003-CANDIDATE2:1.11.2.2 netbsd-1-3-PATCH003-CANDIDATE1:1.11.2.2 netbsd-1-3-PATCH003-CANDIDATE0:1.11.2.2 netbsd-1-3-PATCH002:1.11.2.2 netbsd-1-3-PATCH001:1.11.2.2 netbsd-1-3-RELEASE:1.11.2.2 netbsd-1-3-BETA:1.11.2.2 netbsd-1-3:1.11.0.2 netbsd-1-3-base:1.11 netbsd-1-2-PATCH001:1.2 netbsd-1-2-RELEASE:1.2 netbsd-1-2-BETA:1.2 netbsd-1-2-base:1.2 netbsd-1-2:1.2.0.4; locks; strict; comment @# @; 1.51 date 2003.10.24.20.12.05; author jdolecek; state dead; branches; next 1.50; 1.50 date 2003.10.10.22.47.11; author jdolecek; state Exp; branches; next 1.49; 1.49 date 2003.10.03.14.35.38; author dsl; state Exp; branches; next 1.48; 1.48 date 2003.09.05.17.03.00; author dsl; state Exp; branches; next 1.47; 1.47 date 2003.08.30.11.00.31; author dsl; state Exp; branches; next 1.46; 1.46 date 2003.08.22.05.06.36; author itojun; state Exp; branches; next 1.45; 1.45 date 2003.07.27.14.18.07; author itojun; state Exp; branches; next 1.44; 1.44 date 2003.04.27.13.15.40; author ragge; state Exp; branches; next 1.43; 1.43 date 2003.04.17.18.03.16; author fvdl; state Exp; branches; next 1.42; 1.42 date 2003.03.30.17.41.55; author wiz; state Exp; branches; next 1.41; 1.41 date 2002.10.21.04.14.56; author lukem; state Exp; branches; next 1.40; 1.40 date 2002.10.04.18.53.38; author elric; state Exp; branches; next 1.39; 1.39 date 2002.08.09.02.39.27; author lukem; state Exp; branches; next 1.38; 1.38 date 2002.06.18.13.40.26; author wiz; state Exp; branches; next 1.37; 1.37 date 2002.06.17.16.21.10; author christos; state Exp; branches; next 1.36; 1.36 date 2002.03.24.17.58.54; author scw; state Exp; branches 1.36.2.1; next 1.35; 1.35 date 2002.03.13.01.26.59; author simonb; state Exp; branches; next 1.34; 1.34 date 2002.03.04.14.02.35; author lukem; state Exp; branches; next 1.33; 1.33 date 2002.03.03.14.16.06; author toshii; state Exp; branches; next 1.32; 1.32 date 2002.02.25.07.35.08; author atatat; state Exp; branches; next 1.31; 1.31 date 2002.02.02.20.58.49; author tls; state Exp; branches; next 1.30; 1.30 date 2002.02.02.07.04.51; author tls; state Exp; branches; next 1.29; 1.29 date 2002.01.19.18.59.20; author oster; state Exp; branches; next 1.28; 1.28 date 2002.01.13.14.22.18; author manu; state Exp; branches; next 1.27; 1.27 date 2001.12.19.18.30.05; author wiz; state Exp; branches; next 1.26; 1.26 date 2001.12.19.17.58.08; author wiz; state Exp; branches; next 1.25; 1.25 date 2000.07.27.18.43.26; author mason; state Exp; branches; next 1.24; 1.24 date 99.12.18.03.09.48; author tsutsui; state Exp; branches 1.24.4.1; next 1.23; 1.23 date 99.10.18.22.41.27; author ad; state Exp; branches; next 1.22; 1.22 date 99.10.06.22.26.16; author ad; state Exp; branches; next 1.21; 1.21 date 99.09.18.00.23.37; author hubertf; state Exp; branches 1.21.2.1; next 1.20; 1.20 date 99.02.27.17.57.31; author scw; state Exp; branches; next 1.19; 1.19 date 99.02.21.18.09.24; author scw; state Exp; branches; next 1.18; 1.18 date 99.02.20.00.21.28; author scw; state Exp; branches; next 1.17; 1.17 date 99.01.16.01.40.29; author abs; state Exp; branches; next 1.16; 1.16 date 98.11.13.04.49.03; author oster; state Exp; branches; next 1.15; 1.15 date 98.10.15.21.22.53; author thorpej; state Exp; branches; next 1.14; 1.14 date 97.11.26.03.09.46; author tv; state Exp; branches; next 1.13; 1.13 date 97.11.20.05.57.48; author fair; state Exp; branches; next 1.12; 1.12 date 97.11.07.21.29.21; author scw; state Exp; branches; next 1.11; 1.11 date 97.08.22.11.30.57; author lukem; state Exp; branches 1.11.2.1; next 1.10; 1.10 date 97.07.31.04.08.31; author perry; state Exp; branches; next 1.9; 1.9 date 97.07.23.01.29.50; author phil; state Exp; branches; next 1.8; 1.8 date 97.07.22.23.13.24; author phil; state Exp; branches; next 1.7; 1.7 date 97.07.07.22.27.05; author veego; state Exp; branches; next 1.6; 1.6 date 97.06.01.09.23.57; author thorpej; state Exp; branches; next 1.5; 1.5 date 97.01.01.23.46.23; author pk; state Exp; branches; next 1.4; 1.4 date 96.11.09.04.01.32; author chuck; state Exp; branches; next 1.3; 1.3 date 96.11.08.22.32.11; author chuck; state Exp; branches; next 1.2; 1.2 date 96.05.20.01.35.48; author chuck; state Exp; branches; next 1.1; 1.1 date 96.04.12.22.57.05; author chuck; state Exp; branches; next ; 1.36.2.1 date 2002.08.10.00.07.33; author lukem; state Exp; branches; next ; 1.24.4.1 date 2000.08.11.20.43.32; author mason; state Exp; branches; next ; 1.21.2.1 date 99.12.27.18.28.54; author wrstuden; state Exp; branches; next ; 1.11.2.1 date 97.11.07.23.23.27; author mellon; state Exp; branches; next 1.11.2.2; 1.11.2.2 date 97.11.20.08.26.40; author mellon; state Exp; branches; next ; desc @@ 1.51 log @switch over to unified MAKEDEV @ text @#!/bin/sh - # # $NetBSD: MAKEDEV,v 1.50 2003/10/10 22:47:11 jdolecek Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. # # Written and contributed by W. Jolitz 12/90 # # Redistribution and use in source and binary forms are permitted provided # that: (1) source distributions retain this entire copyright notice and # comment, and (2) distributions including binaries display the following # acknowledgement: ``This product includes software developed by the # University of California, Berkeley and its contributors'' in the # documentation or other materials provided with the distribution and in # all advertising materials mentioning features or use of this software. # Neither the name of the University nor the names of its contributors may # be used to endorse or promote products derived from this software without # specific prior written permission. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # @@(#)MAKEDEV 5.2 (Berkeley) 6/22/90 # ########################################################################### # # PLEASE RUN "cd ../share/man/man8 ; make makedevs" # AFTER CHANGING THIS FILE, AND COMMIT THE UPDATED MANPAGE! # ########################################################################### # # Device "make" file. Valid arguments: # all makes all known devices, including local devices. # Tries to make the 'standard' number of each type. # init A set of devices that is used for MFS /dev by init. # May be equal to "all". # std standard devices # local configuration specific devices # # Tapes: # st* SCSI tapes # # Disks: # sd* SCSI disks # cd* SCSI CD-ROM # vnd* "file" pseudo-disks # md* memory pseudo-disk devices # ccd* concatenated disk devices # cgd* cryptographic disk devices # raid* RAIDframe disk devices # # Serial ports: # tty* Onboard serial ports. # On the mvme147 these are: ttyZ1, ttyZ2 and ttyZ3. # On the mvme167, and '177: ttyC1, ttyC2 and ttyC3. # Note that tty[CZ]0 is grabbed by the console device # so is not created by default # # Pseudo terminals: # pty* set of 62 master and slave pseudo terminals # opty first 16 ptys, to save inodes on install media # # Printers: # lpt* stock lp # lpa* interruptless lp # # Special purpose devices: # clockctl clock control for non root users # fd file descriptors # bpf* packet filter # lkm loadable kernel modules interface # tun* network tunnel driver # scsibus* SCSI busses, see scsi(4), scsictl(8) # ss* SCSI scanner # uk* unknown SCSI device # ch* SCSI media changer # ipl IP Filter device # pf PF packet filter # crypto hardware crypto access driver # random Random number generator # systrace syscall tracer # PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/etc umask 77 # Check if we have fdesc mounted if [ -d fd ]; then case "`df fd`" in *fdesc*) nofdesc=false;; *) nofdesc=true;; esac else nofdesc=true fi makedev() { for i do case $i in init|all) makedev std fd sd0 sd1 sd2 pty0 makedev ttyZ1 ttyZ2 ttyZ3 ttyC1 ttyC2 ttyC3 makedev st0 st1 ch0 cd0 cd1 lpa0 lpt0 vnd0 vnd1 makedev bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 makedev tun0 tun1 makedev ccd0 ccd1 ccd2 ccd3 md0 ss0 ch0 uk0 uk1 lkm makedev cgd0 cgd1 cgd2 cgd3 makedev ipl pf crypto random local makedev raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7 makedev scsibus0 scsibus1 scsibus2 scsibus3 makedev clockctl makedev systrace ;; std) rm -f console constty drum mem kmem null zero klog ksyms mknod console c 0 0 mknod constty c 0 1 mknod drum c 3 0 ; chmod 640 drum ; chgrp kmem drum mknod kmem c 2 1 ; chmod 640 kmem ; chgrp kmem kmem mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem mknod null c 2 2 ; chmod 666 null mknod zero c 2 12 ; chmod 666 zero mknod klog c 6 0 ; chmod 600 klog mknod ksyms c 42 0 ; chmod 444 ksyms if $nofdesc; then rm -f tty stdin stdout stderr mknod tty c 1 0 ; chmod 666 tty mknod stdin c 21 0 ; chmod 666 stdin mknod stdout c 21 1 ; chmod 666 stdout mknod stderr c 21 2 ; chmod 666 stderr fi ;; fd) if $nofdesc; then rm -f fd/* mkdir fd 2>/dev/null n=0 while [ $n -lt 64 ]; do mknod fd/$n c 21 $n n=$(($n + 1)) done chmod 755 fd chmod 666 fd/* fi ;; md*) unit=${i#md}; blk=9; chr=32 rm -f md${unit}? rmd${unit}? mknod md${unit}a b $blk $(($unit * 8 + 0)) mknod md${unit}c b $blk $(($unit * 8 + 2)) # mknod rmd${unit}a b $chr $(($unit * 8 + 0)) # mknod rmd${unit}c b $chr $(($unit * 8 + 2)) chgrp operator md${unit}? #rmd${unit}? chmod 640 md${unit}? #rmd${unit}? ;; ss*) case $i in ss*) name=ss; unit=${i#ss}; chr=33;; esac rm -f $name$unit n$name$unit en$name$unit mknod $name$unit c $chr $(($unit * 16 + 0)) mknod n$name$unit c $chr $(($unit * 16 + 1)) mknod en$name$unit c $chr $(($unit * 16 + 3)) chgrp operator $name$unit n$name$unit en$name$unit chmod 640 $name$unit n$name$unit en$name$unit ;; ccd*|cgd*|sd*|vnd*|raid*) case $i in ccd*) name=ccd; unit=${i#ccd}; blk=5; chr=17;; cgd*) name=cgd; unit=${i#cgd}; blk=17; chr=41;; sd*) name=sd; unit=${i#sd}; blk=4; chr=8;; vnd*) name=vnd; unit=${i#vnd}; blk=6; chr=19;; raid*) name=raid; unit=${i#raid}; blk=16; chr=37;; esac rm -f $name$unit? r$name$unit? mknod ${name}${unit}a b $blk $(($unit * 8 + 0)) mknod ${name}${unit}b b $blk $(($unit * 8 + 1)) mknod ${name}${unit}c b $blk $(($unit * 8 + 2)) mknod ${name}${unit}d b $blk $(($unit * 8 + 3)) mknod ${name}${unit}e b $blk $(($unit * 8 + 4)) mknod ${name}${unit}f b $blk $(($unit * 8 + 5)) mknod ${name}${unit}g b $blk $(($unit * 8 + 6)) mknod ${name}${unit}h b $blk $(($unit * 8 + 7)) mknod r${name}${unit}a c $chr $(($unit * 8 + 0)) mknod r${name}${unit}b c $chr $(($unit * 8 + 1)) mknod r${name}${unit}c c $chr $(($unit * 8 + 2)) mknod r${name}${unit}d c $chr $(($unit * 8 + 3)) mknod r${name}${unit}e c $chr $(($unit * 8 + 4)) mknod r${name}${unit}f c $chr $(($unit * 8 + 5)) mknod r${name}${unit}g c $chr $(($unit * 8 + 6)) mknod r${name}${unit}h c $chr $(($unit * 8 + 7)) chgrp operator $name$unit? r$name$unit? chmod 640 $name$unit? r$name$unit? ;; ttyZ*) unit=${i#????} rm -f ttyZ$unit mknod ttyZ$unit c 12 $unit chown uucp ttyZ$unit ;; ttyC*) unit=${i#????} rm -f ttyC$unit mknod ttyC$unit c 13 $unit chown uucp ttyC$unit ;; opty) rm -f ttyp[0-9a-f] ptyp[0-9a-f] for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f do case $j in [0-9]) jn=$j ;; a) jn=10 ;; b) jn=11 ;; c) jn=12 ;; d) jn=13 ;; e) jn=14 ;; f) jn=15 ;; esac mknod ttyp$j c 4 $jn mknod ptyp$j c 5 $jn done chmod 666 ttyp[0-9a-f] ptyp[0-9a-f] ;; pty*) class=${i#pty} set -- p q r s t u v w x y z P Q R S T if [ "$class" -ge $# ]; then echo "$MAKEDEV: $i: pty unit must be between 0 and 15" continue fi shift $class name=$1 if [ "$name" = v ]; then echo "$MAKEDEV: $i: pty unit conflicts with console ttyv0 device." continue fi rm -f tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z] jn=0 unit=$(($class * 16)) names= set -- - 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 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 Y Z while shift j=$1 [ -n "$j" ] do if [ $j = g ]; then unit=$(($unit + $class * 30 + 256 - 16)) fi mknod tty$name$j c 4 $unit mknod pty$name$j c 5 $unit names="$names tty$name$j pty$name$j" unit=$(($unit + 1)) done chmod 666 $names unset names ;; st*) case $i in st*) name=st; unit=${i#st}; chr=20; blk=7;; esac rm -f $name$unit n$name$unit e$name$unit en$name$unit \ r$name$unit nr$name$unit er$name$unit enr$name$unit mknod $name$unit b $blk $(($unit * 16 + 0)) mknod n$name$unit b $blk $(($unit * 16 + 1)) mknod e$name$unit b $blk $(($unit * 16 + 2)) mknod en$name$unit b $blk $(($unit * 16 + 3)) mknod r$name$unit c $chr $(($unit * 16 + 0)) mknod nr$name$unit c $chr $(($unit * 16 + 1)) mknod er$name$unit c $chr $(($unit * 16 + 2)) mknod enr$name$unit c $chr $(($unit * 16 + 3)) chgrp operator $name$unit n$name$unit e$name$unit en$name$unit \ r$name$unit nr$name$unit er$name$unit enr$name$unit chmod 660 $name$unit n$name$unit e$name$unit en$name$unit \ r$name$unit nr$name$unit er$name$unit enr$name$unit ;; ch*|uk*) case $i in ch*) name=ch; unit=${i#ch}; chr=31;; uk*) name=uk; unit=${i#uk}; chr=34;; esac rm -f $name$unit mknod $name$unit c $chr $unit chgrp operator $name$unit chmod 640 $name$unit ;; cd*) case $i in cd*) name=cd; unit=${i#cd}; chr=18; blk=8;; esac rm -f $name$unit? r$name$unit? mknod ${name}${unit}a b $blk $(($unit * 8 + 0)) mknod ${name}${unit}d b $blk $(($unit * 8 + 3)) mknod r${name}${unit}a c $chr $(($unit * 8 + 0)) mknod r${name}${unit}d c $chr $(($unit * 8 + 3)) chgrp operator $name$unit? r$name$unit? chmod 640 $name$unit? r$name$unit? ;; lpt*|lpa*) case $i in lpt*) name=lpt; unit=${i#lpt}; chr=11; flags=0;; lpa*) name=lpa; unit=${i#lpa}; chr=11; flags=128;; esac rm -f $name$unit mknod $name$unit c $chr $(($unit + $flags)) ;; bpf*|tun*) case $i in bpf*) name=bpf; unit=${i#bpf}; chr=22;; tun*) name=tun; unit=${i#tun}; chr=23;; esac rm -f $name$unit mknod $name$unit c $chr $unit ;; lkm) rm -f lkm mknod lkm c 24 0 chgrp kmem lkm chmod 640 lkm ;; ipl) rm -f ipl ipnat ipstate ipauth mknod ipl c 7 0 mknod ipnat c 7 1 mknod ipstate c 7 2 mknod ipauth c 7 3 chmod 600 ipl ipnat ipstate ipauth ;; pf) rm -f pf mknod pf c 161 0 chmod 600 pf ;; crypto) rm -f crypto mknod crypto c 160 0 chmod 666 crypto ;; random) rm -f random urandom mknod random c 35 0 mknod urandom c 35 1 chmod 444 random chmod 644 urandom ;; scsibus*) unit=${i#scsibus} rm -f scsibus$unit mknod scsibus$unit c 36 $unit chmod 644 scsibus$unit ;; clockctl) rm -f clockctl mknod clockctl c 39 0 chgrp ntpd clockctl chmod 660 clockctl ;; systrace) rm -f systrace mknod systrace c 40 0 chmod 644 systrace ;; local) if [ -f "$0.local" ]; then umask 0 sh $0.local all umask 77 fi ;; *) echo $i: unknown device ;; esac done } makedev $* @ 1.50 log @reassing majors for crypto and pf to use the newly defined MI major range @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.49 2003/10/03 14:35:38 dsl Exp $ @ 1.49 log @Add a /dev/constty == /dev/console but with minor 1. Use for tty sessions on 'console' so that output doesn't pinched by anyone using TIOCCONS to get kernel and system messages. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.48 2003/09/05 17:03:00 dsl Exp $ d354 1 a354 1 mknod pf c 43 0 d360 1 a360 1 mknod crypto c 44 0 @ 1.48 log @Put back port specific majors for ptys @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.47 2003/08/30 11:00:31 dsl Exp $ d121 1 a121 1 rm -f console drum mem kmem null zero klog ksyms d123 1 @ 1.47 log @Change the way pseudo tty devices are generated in order to avoid any pipes and running other commands (eg dd). Measurable speeds up creating pseudo ttys. (there has to be a better way than editing 51 files! - tedious at only 6 key presses per file) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.46 2003/08/22 05:06:36 itojun Exp $ d264 2 a265 2 mknod tty$name$j c 5 $unit mknod pty$name$j c 6 $unit @ 1.46 log @create /dev/crypto @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.45 2003/07/27 14:18:07 itojun Exp $ d240 11 a250 8 name=`echo pqrstuvwxyzPQRST | dd bs=1 count=1 skip=$class 2>/dev/null` case $name in v) echo "$0: $i: pty unit conflicts with console ttyv0 device." continue ;; ?) ;; *) echo "$0: $i: pty unit must be between 0 and 15" continue ;; esac d253 7 a259 1 while [ $jn -lt 62 ] d261 2 a262 4 j=`echo 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ | dd bs=1 count=1 skip=$jn 2>/dev/null` skip=0 if [ $jn -ge 16 ]; then skip=$(($class * 30 + 256 - 16)) d264 4 a267 4 unit=$(($class * 16 + $jn + $skip)) mknod tty$name$j c 4 $unit mknod pty$name$j c 5 $unit jn=$(($jn + 1)) d269 2 a270 1 chmod 666 tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z] @ 1.45 log @reserve cdev major # for PF. ok'ed by technical-exec @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.44 2003/04/27 13:15:40 ragge Exp $ d80 1 d113 1 a113 1 makedev ipl pf random local d347 6 @ 1.44 log @Add ksyms to "std" devices. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.43 2003/04/17 18:03:16 fvdl Exp $ d79 1 d112 1 a112 1 makedev ipl random local d340 6 @ 1.43 log @Add an 'init' target, that creates the device nodes in the case where MAKEDEV is being called from init(8) to create an MFS /dev. For most ports, this is the same as 'all'. The only exceptions are i386 and x86_64. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.42 2003/03/30 17:41:55 wiz Exp $ d119 1 a119 1 rm -f console drum mem kmem null zero klog d127 1 @ 1.42 log @Miscellaneous fixes from Igor Sobrado, in PRs 20943-20959. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.41 2002/10/21 04:14:56 lukem Exp $ d36 2 d103 1 a103 1 all) @ 1.41 log @whitespace consistency cleanup @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.40 2002/10/04 18:53:38 elric Exp $ d47 1 a47 1 # ccd* contatenated disk devices @ 1.40 log @Include cgd on the list of things to be mknod(8)ed on all arches. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.39 2002/08/09 02:39:27 lukem Exp $ a232 1 d238 4 a241 4 continue;; ?) ;; *) echo "$0: $i: pty unit must be between 0 and 15" continue ;; @ 1.39 log @- in local), only run $0.local if it is an existing file (prevents spurious warning for mfs /dev, amongst other things) - for mipsco, news68k, newsmips: ensure that "umask 77" is run after $0.local - for playstation2: add local) target, and use in all) (for consistency) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.38 2002/06/18 13:40:26 wiz Exp $ d48 1 d108 1 d171 1 a171 1 ccd*|sd*|vnd*|raid*) d174 1 @ 1.38 log @Update comment on how to regenerate MAKEDEV(8) after changing the MAKEDEV script. Not that anybody acts on it, but it's nicer if it's correct. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.37 2002/06/17 16:21:10 christos Exp $ d365 5 a369 3 umask 0 sh $0.local all umask 77 @ 1.37 log @Add device creation support for systrace. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.36 2002/03/24 17:58:54 scw Exp $ d28 1 a28 1 # PLEASE RUN "cd ../share/man/man8 ; perl5 MAKEDEV2manpage.pl" @ 1.36 log @For md*, create md?a instead of just md?. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.35 2002/03/13 01:26:59 simonb Exp $ d77 1 d111 1 d356 6 @ 1.36.2.1 log @Pull up revision 1.39 (requested by lukem): - in local), only run $0.local if it is an existing file (prevents spurious warning for mfs /dev, amongst other things) - for mipsco, news68k, newsmips: ensure that "umask 77" is run after $0.local - for playstation2: add local) target, and use in all) (for consistency) @ text @d3 1 a3 1 # $NetBSD$ d357 3 a359 5 if [ -f "$0.local" ]; then umask 0 sh $0.local all umask 77 fi @ 1.35 log @Remove trailing semicolons from lines that don't need them. TABify many lines. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.34 2002/03/04 14:02:35 lukem Exp $ d146 7 a152 6 rm -f md${unit} md${unit}c rmd${unit} mknod md${unit} b $blk $((($unit + 0) * 8)) mknod md${unit}c b $blk $((($unit + 16) * 8)) # mknod rmd${unit} c $chr $((($unit + 16) * 8)) chgrp operator md${unit} md${unit}c #rmd${unit} chmod 640 md${unit} md${unit}c #rmd${unit} @ 1.34 log @various cleanups inspired by etc.i386/MAKEDEV: * use "ln -fs foo bar" instead of "rm -f bar; ln -s foo bar" * remove unnecessary chown root or chgrp wheel directives; older code here didn't bother doing this, so why be inconsistent * when making directories, don't use -p and don't redirect stdout to /dev/null * clean up whitespace * wrap the main parser code in a function makedev(), and call makedev instead of "sh $0". (this is a bit faster) * don't barf when we have fdesc mounted; just skip the devices fdesc provides (these files should really be automagically generated...) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.33 2002/03/03 14:16:06 toshii Exp $ d102 1 a102 1 makedev st0 st1 ch0 cd0 cd1 lpa0 lpt0 vnd0 vnd1 d106 1 a106 1 makedev ipl random local d145 1 a145 1 unit=${i#md}; blk=9; chr=32; d150 1 a150 1 chgrp operator md${unit} md${unit}c #rmd${unit} d224 1 a224 1 chmod 666 ttyp[0-9a-f] ptyp[0-9a-f] d260 1 a260 1 r$name$unit nr$name$unit er$name$unit enr$name$unit d270 1 a270 1 r$name$unit nr$name$unit er$name$unit enr$name$unit d272 1 a272 1 r$name$unit nr$name$unit er$name$unit enr$name$unit d342 1 a342 1 unit=${i#scsibus}; @ 1.33 log @Use a tab instead of 7 spaces. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.32 2002/02/25 07:35:08 atatat Exp $ d81 14 d100 10 a109 10 sh $0 std fd sd0 sd1 sd2 pty0 sh $0 ttyZ1 ttyZ2 ttyZ3 ttyC1 ttyC2 ttyC3 sh $0 st0 st1 ch0 cd0 cd1 lpa0 lpt0 vnd0 vnd1 sh $0 bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 sh $0 tun0 tun1 sh $0 ccd0 ccd1 ccd2 ccd3 md0 ss0 ch0 uk0 uk1 lkm sh $0 ipl random local sh $0 raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7 sh $0 scsibus0 scsibus1 scsibus2 scsibus3 sh $0 clockctl d113 1 a113 1 rm -f console drum mem kmem null zero tty klog stdin stdout stderr a119 1 mknod tty c 1 0 ; chmod 666 tty d121 7 a127 3 mknod stdin c 21 0 ; chmod 666 stdin mknod stdout c 21 1 ; chmod 666 stdout mknod stderr c 21 2 ; chmod 666 stderr d131 11 a141 10 rm -f fd/* mkdir fd > /dev/null 2>&1 n=0 while [ $n -lt 64 ]; do mknod fd/$n c 21 $n n=$(($n + 1)) done chown -R root.wheel fd chmod 755 fd chmod 666 fd/* d198 1 a198 1 chown uucp.wheel ttyZ$unit d205 1 a205 1 chown uucp.wheel ttyC$unit a223 1 chgrp wheel ttyp[0-9a-f] ptyp[0-9a-f] d252 1 a252 2 chgrp wheel tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z] chmod 666 tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z] a305 1 chown root.wheel $name$unit a314 1 chown root.wheel $name$unit d320 1 a320 1 chown root.kmem lkm a329 1 chown root.wheel ipl ipnat ipstate ipauth a336 1 chown root.wheel random urandom a344 1 chown root:wheel scsibus$unit d351 1 a351 1 chown root.ntpd clockctl d367 4 @ 1.32 log @Change a 62 to a 16, so that the proper number of slots is skipped. Fixes PR 15650. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.31 2002/02/02 20:58:49 tls Exp $ d66 1 a66 1 # clockctl clock control for non root users @ 1.31 log @Fix minor mistake made while increasing number of pty devices: where we had "pty0 pty1 pty2 pty3" before, for a total of 64 device nodes, we now want just "pty0" for a total of 62 -- the original commit had "pty0 pty1" for a total of 124, which ate too many inodes and made "ls /dev" a bit messy. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.30 2002/02/02 07:04:51 tls Exp $ d230 1 a230 1 unit=$(($class * 62 + $jn + $skip)) @ 1.30 log @Add support for many more (930 or 992) ptys than the current 256. Changes taken from the i386 MAKEDEV. Note that the unusual use of 'dd' to index an array was chosen because 'dd' is on all ports' install media. This form of this change comes from Andrew Brown; the original idea to bump the number of ptys this way comes from Brian Marcotte at Panix. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.29 2002/01/19 18:59:20 oster Exp $ d86 1 a86 1 sh $0 std fd sd0 sd1 sd2 pty0 pty1 @ 1.29 log @Update the various MAKEDEV's to reflect the default of 8 RAIDframe devices. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.28 2002/01/13 14:22:18 manu Exp $ d58 2 a59 1 # pty* set of 16 master and slave pseudo terminals d86 1 a86 1 sh $0 std fd sd0 sd1 sd2 pty0 pty1 pty2 pty3 d190 21 d213 5 a217 17 case $class in 0) name=p;; 1) name=q;; 2) name=r;; 3) name=s;; 4) name=t;; 5) name=u;; 6) name=v;; 7) name=w;; 8) name=x;; 9) name=y;; 10) name=z;; 11) name=P;; 12) name=Q;; 13) name=R;; 14) name=S;; 15) name=T;; d221 3 a223 2 rm -f tty$name[0-9a-f] pty$name[0-9a-f] for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f d225 6 a230 10 case $j in [0-9]) jn=$j ;; a) jn=10 ;; b) jn=11 ;; c) jn=12 ;; d) jn=13 ;; e) jn=14 ;; f) jn=15 ;; esac unit=$(($class * 16 + $jn)) d233 1 d235 2 a236 2 chgrp wheel tty$name? pty$name? chmod 666 tty$name? pty$name? @ 1.28 log @Added clockctl @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.27 2001/12/19 18:30:05 wiz Exp $ d91 2 a92 1 sh $0 ipl random local raid0 raid1 raid2 raid3 @ 1.27 log @Standardize ch* and uk* descriptions. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.26 2001/12/19 17:58:08 wiz Exp $ d65 1 d93 1 d326 7 @ 1.26 log @Standardize scsibus* description. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.25 2000/07/27 18:43:26 mason Exp $ d71 2 a72 2 # uk* SCSI unknown # ch* SCSI changer @ 1.25 log @Move to a default of 64 PTYs in "all" targets. Normalize "floppy" and "minimal" targets to use 16 PTYs. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.24 1999/12/18 03:09:48 tsutsui Exp $ d69 1 a69 1 # scsibus* SCSI busses, see scsictl(8), scsi(4) @ 1.24 log @Correct md* entries. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.23 1999/10/18 22:41:27 ad Exp $ d84 1 a84 1 sh $0 std fd sd0 sd1 sd2 pty0 @ 1.24.4.1 log @Create 64 PTYs in "all" target by default. Requested by mason, approved by jhawk. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.24 1999/12/18 03:09:48 tsutsui Exp $ d84 1 a84 1 sh $0 std fd sd0 sd1 sd2 pty0 pty1 pty2 pty3 @ 1.23 log @Back out previous @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.21 1999/09/18 00:23:37 hubertf Exp $ d46 1 a46 1 # md* "memory" pseudo-disks d123 7 a129 8 case $i in md*) name=md; unit=${i#md}; chr=32; blk=9;; esac rm -f $name$unit r$name$unit mknod $name$unit b $blk $(($unit + 0)) mknod r$name$unit c $chr $(($unit + 16)) chgrp operator $name$unit r$name$unit chmod 640 $name$unit r$name$unit @ 1.22 log @Final chown user.group -> chown user:group changes. @ text @d117 1 a117 1 chown -R root:wheel fd d177 1 a177 1 chown uucp:wheel ttyZ$unit d184 1 a184 1 chown uucp:wheel ttyC$unit d280 1 a280 1 chown root:wheel $name$unit d290 1 a290 1 chown root:wheel $name$unit d306 1 a306 1 chown root:wheel ipl ipnat ipstate ipauth d314 1 a314 1 chown root:wheel random urandom @ 1.21 log @Tidy up comments a bit, to make the manpages generated from the a bit nicer. Also, add a comment on how to re-generate the manpages if the MAKEDEV file was changed. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.20 1999/02/27 17:57:31 scw Exp $ d117 1 a117 1 chown -R root.wheel fd d177 1 a177 1 chown uucp.wheel ttyZ$unit d184 1 a184 1 chown uucp.wheel ttyC$unit d280 1 a280 1 chown root.wheel $name$unit d290 1 a290 1 chown root.wheel $name$unit d306 1 a306 1 chown root.wheel ipl ipnat ipstate ipauth d314 1 a314 1 chown root.wheel random urandom @ 1.21.2.1 log @Pull up to last week's -current. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.24 1999/12/18 03:09:48 tsutsui Exp $ d46 1 a46 1 # md* memory pseudo-disk devices d123 8 a130 7 unit=${i#md}; blk=9; chr=32; rm -f md${unit} md${unit}c rmd${unit} mknod md${unit} b $blk $((($unit + 0) * 8)) mknod md${unit}c b $blk $((($unit + 16) * 8)) # mknod rmd${unit} c $chr $((($unit + 16) * 8)) chgrp operator md${unit} md${unit}c #rmd${unit} chmod 640 md${unit} md${unit}c #rmd${unit} @ 1.20 log @Add target for raid devices. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.19 1999/02/21 18:09:24 scw Exp $ d26 7 d55 1 a55 1 # so is not created by default. a63 2 # Call units: # d69 1 a69 1 # scsibus* SCSI busses @ 1.19 log @Fix the ttyC*and ttyZ* entries to correctly parse the unit number. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.18 1999/02/20 00:21:28 scw Exp $ d140 1 a140 1 ccd*|sd*|vnd*) d145 1 @ 1.18 log @Update MAKEDEV to create cd2401 tty devices. Add getty entries in "/etc/ttys" for same. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.17 1999/01/16 01:40:29 abs Exp $ d168 1 a168 1 unit=${i#???} d175 1 a175 1 unit=${i#???} @ 1.17 log @On platforms that have GENERIC kernels containing 'bpfilter 8' or greater, create at least eight bpf dev entries. (All except atari). @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.16 1998/11/13 04:49:03 oster Exp $ d44 5 a48 3 # tty* Onboard serial ports 1 to 3 (tty01 -> tty03). Note that # tty00 is grabbed by the console device so is not created # by default. d79 2 a80 1 sh $0 std fd sd0 sd1 sd2 pty0 tty01 tty02 tty03 d167 1 a167 1 tty*) d169 10 a178 3 rm -f tty$unit mknod tty$unit c 12 $unit chown uucp.wheel tty$unit @ 1.16 log @Added RAID devices for everyone! @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.15 1998/10/15 21:22:53 thorpej Exp $ d79 2 a80 1 sh $0 bpf0 bpf1 bpf2 bpf3 tun0 tun1 @ 1.15 log @Add /dev/scsibus* device nodes. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.14 1997/11/26 03:09:46 tv Exp $ d41 1 d81 1 a81 1 sh $0 ipl random local @ 1.14 log @Fixes PR #3858: /dev/fd uniformly updated in MAKEDEV to make directory (and file nodes) owned by root.wheel, and /dev/fd directory mode 755. Now it matches mtree (and the rest of the system's permissions/owner layout). @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.13 1997/11/20 05:57:48 fair Exp $ d61 1 d81 1 d299 8 @ 1.13 log @add appropriate entry to make "random" as documented in rnd(4). add "random" entry to "all". @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.12 1997/11/07 21:29:21 scw Exp $ d105 2 a106 2 chown -R bin.bin fd chmod 555 fd @ 1.12 log @Add 'tty*' target for onboard serial ports. Include in list for 'all'. (I'm surprised this wasn't spotted earlier...) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.11 1997/08/22 11:30:57 lukem Exp $ d65 1 d79 1 a79 1 sh $0 ipl local d288 9 @ 1.11 log @* st* has perms 660 not 640 * add enss* to ss* * invoke MAKEDEV.local as $0.local, and reset the umask afterwards @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.10 1997/07/31 04:08:31 perry Exp $ d42 5 d74 1 a74 1 sh $0 std fd sd0 sd1 sd2 pty0 d157 7 @ 1.11.2.1 log @Pull rev 1.12 up from trunk (scw) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.12 1997/11/07 21:29:21 scw Exp $ a41 5 # Serial ports: # tty* Onboard serial ports 1 to 3 (tty01 -> tty03). Note that # tty00 is grabbed by the console device so is not created # by default. # d69 1 a69 1 sh $0 std fd sd0 sd1 sd2 pty0 tty01 tty02 tty03 a151 7 ;; tty*) unit=${i#???} rm -f tty$unit mknod tty$unit c 12 $unit chown uucp.wheel tty$unit @ 1.11.2.2 log @Pull rev 1.13 up from trunk (fair) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.11.2.1 1997/11/07 23:23:27 mellon Exp $ a64 1 # random Random number generator d78 1 a78 1 sh $0 ipl random local a286 9 ;; random) rm -f random urandom mknod random c 35 0 mknod urandom c 35 1 chown root.wheel random urandom chmod 444 random chmod 644 urandom @ 1.10 log @Make MAKEDEV and MAKEDEV.local mutually consistant. Reported in pr #2596 by Tatoku Ogaito, but my fix is different from his. This is purely an aesthetic change. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.9 1997/07/23 01:29:50 phil Exp $ d119 1 a119 1 rm -f $name$unit n$name$unit d122 3 a124 2 chgrp operator $name$unit n$name$unit chmod 640 $name$unit n$name$unit d212 1 a212 1 chmod 640 $name$unit n$name$unit e$name$unit en$name$unit \ d279 6 a284 1 sh MAKEDEV.local all @ 1.9 log @Make all tty??/pty?? pairs that can be opened by openpty(). Remove use of awk for generating names. Make all consistent as possible. Closes PR 3420. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.8 1997/07/22 23:13:24 phil Exp $ d278 1 a278 1 sh $0.local @ 1.8 log @Make all MAKEDEVs make fd/* similar. No need for awk or expr. Inspired by PR 3420. Some MAKEDEVS had the fd separated out of std and fd added to std. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.7 1997/07/07 22:27:05 veego Exp $ d156 18 a173 18 0) offset=0 name=p;; 1) offset=16 name=q;; 2) offset=32 name=r;; 3) offset=48 name=s;; # Note that telnetd, rlogind, and xterm (at least) only look at p-s. 4) offset=64 name=t;; *) echo bad unit for pty in: $i;; esac case $class in 0|1|2|3|4) umask 0 eval `echo $offset $name | awk ' { b=$1; n=$2 } END { for (i = 0; i < 16; i++) printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \ rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \ n, i, n, i, b+i, n, i, n, i, b+i); }'` umask 77 ;; d175 18 @ 1.7 log @Added a new device entry for ipfilter: /dev/ipauth @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.6 1997/06/01 09:23:57 thorpej Exp $ d94 5 a98 3 (cd fd && eval `echo "" | awk ' BEGIN { \ for (i = 0; i < 64; i++) \ printf("mknod %d c 21 %d;", i, i)}'`) @ 1.6 log @Add ipl, ipnat, and ipstate devices at the appropriate minors of cdev major 7. @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.5 1997/01/01 23:46:23 pk Exp $ d247 1 a247 1 rm -f ipl ipnat ipstate d251 3 a253 2 chown root.wheel ipl ipnat ipstate chmod 600 ipl ipnat ipstate @ 1.5 log @Device rename: `rd' => `md' @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.4 1996/11/09 04:01:32 chuck Exp $ d59 1 d73 1 a73 1 sh $0 local d244 9 @ 1.4 log @add lp @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.3 1996/11/08 22:32:11 chuck Exp $ d39 1 a39 1 # rd* "ramdisk" pseudo-disks d71 1 a71 1 sh $0 ccd0 ccd1 ccd2 ccd3 rd0 ss0 ch0 uk0 uk1 lkm d101 1 a101 1 rd*) d103 1 a103 1 rd*) name=rd; unit=${i#rd}; chr=32; blk=9;; @ 1.3 log @updated MAKEDEV based on i386 version (as requested by mycroft) @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.44 1996/09/08 03:33:55 mycroft Exp $ d69 1 a69 1 sh $0 st0 st1 ch0 cd0 cd1 vnd0 vnd1 d218 9 a226 9 #lpt*|lpa*) # case $i in # lpt*) name=lpt; unit=${i#lpt}; chr=16; flags=0;; # lpa*) name=lpa; unit=${i#lpa}; chr=16; flags=128;; # esac # rm -f $name$unit # mknod $name$unit c $chr $(($unit + $flags)) # chown root.wheel $name$unit # ;; @ 1.2 log @add ramdisk, clean @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.1 1996/04/12 22:57:05 chuck Exp $ d8 1 a8 27 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the University of # California, Berkeley and its contributors. # 4. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. d10 15 a24 1 # @@(#)MAKEDEV 5.5 (Berkeley) 5/28/91 d27 2 d31 1 d33 2 a34 1 # st* Exabyte tape d36 2 a37 3 # ccd* "concatenated" pseudo-disks # rd* ram disk # sd* HP300 SCSI disks d39 3 a41 1 # Terminal multiplexors: d44 1 d46 3 d50 1 d54 1 d56 3 a58 1 # lkm loadable kernel modules interface d61 1 a61 1 PATH=/sbin:/bin/:/usr/bin:/usr/sbin:/usr/etc d68 5 a72 4 sh MAKEDEV std sh MAKEDEV pty0 vnd0 vnd1 vnd2 vnd3 sh MAKEDEV bpf0 bpf1 bpf2 bpf3 tun0 tun1 tun2 tun3 lkm sh MAKEDEV local d76 1 d80 1 a80 1 mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem d95 1 a95 1 printf("mknod %d c 21 %d;", i, i)}'`) d101 1 a101 2 st*) umask 0 ; unit=`expr $i : '..\(.*\)'` d103 1 a103 25 st*) name=st; blk=6; chr=20;; esac case $unit in 0|1|2|3|4|5|6|7) four=`expr $unit + 4` ; eight=`expr $unit + 8` twelve=`expr $unit + 12`; twenty=`expr $unit + 20` # # block devices don't work so don't make them #mknod ${name}${unit} b $blk $unit #mknod ${name}${four} b $blk $four #mknod ${name}${eight} b $blk $eight #mknod ${name}${twelve} b $blk $twelve #mknod n${name}${unit} b $blk $four ;: sanity w/pdp11 v7 #mknod n${name}${eight} b $blk $twelve ;: ditto # mknod r${name}${unit} c $chr $unit mknod r${name}${four} c $chr $four mknod r${name}${eight} c $chr $eight mknod r${name}${twelve} c $chr $twelve ln r${name}${four} nr${name}${unit} ;: sanity w/pdp11 v7 ln r${name}${twelve} nr${name}${eight} ;: ditto ;; *) echo bad unit for tape in: $1 ;; d105 5 a109 1 umask 77 d112 3 a114 49 bpf*) unit=`expr $i : 'bpf\(.*\)'` rm -f bpf$unit mknod bpf$unit c 22 $unit chmod 600 bpf$unit chown root.wheel bpf$unit ;; tun*) unit=`expr $i : 'tun\(.*\)'` rm -f tun$unit mknod tun$unit c 23 $unit chmod 600 tun$unit chown root.wheel tun$unit ;; ccd*|fd*|sd*|vnd*) umask 2 ; unit=`expr $i : '.*d\(.*\)'` case $i in sd*) name=sd; blk=4; chr=8;; ccd*) name=ccd; blk=5; chr=17;; vnd*) name=vnd; blk=6; chr=19;; esac case $unit in 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|\ 17|18|19|20|21|22|23|24|25|26|27|28|29|30|31) rm -f $name$unit? r$name$unit? mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0` mknod ${name}${unit}b b $blk `expr $unit '*' 8 + 1` mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2` mknod ${name}${unit}d b $blk `expr $unit '*' 8 + 3` mknod ${name}${unit}e b $blk `expr $unit '*' 8 + 4` mknod ${name}${unit}f b $blk `expr $unit '*' 8 + 5` mknod ${name}${unit}g b $blk `expr $unit '*' 8 + 6` mknod ${name}${unit}h b $blk `expr $unit '*' 8 + 7` mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0` mknod r${name}${unit}b c $chr `expr $unit '*' 8 + 1` mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2` mknod r${name}${unit}d c $chr `expr $unit '*' 8 + 3` mknod r${name}${unit}e c $chr `expr $unit '*' 8 + 4` mknod r${name}${unit}f c $chr `expr $unit '*' 8 + 5` mknod r${name}${unit}g c $chr `expr $unit '*' 8 + 6` mknod r${name}${unit}h c $chr `expr $unit '*' 8 + 7` chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h] chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h] ;; *) echo bad unit for disk in: $i ;; d116 5 a120 1 umask 77 d123 25 a147 14 rd*) umask 2 ; unit=`expr $i : '.*d\(.*\)'` mknod rd$unit b 9 $unit # mknod rrd$unit b ??? `expr $unit + 16` mknod rd${unit}c b 9 `expr $unit + 16` chgrp operator rd$unit rd${unit}c chmod 640 rd$unit rd${unit}c ;; lkm) rm -f lkm mknod lkm c 24 0 chown root.kmem lkm chmod 640 lkm d151 1 a151 1 class=`expr $i : 'pty\(.*\)'` d166 3 a168 3 printf("mknod tty%s%x c 4 %d; \ mknod pty%s%x c 5 %d; ", \ n, i, b+i, n, i, b+i); }'` a169 3 if [ $class = 1 ]; then mv ttyqf ttyv0; mv ptyqf ptyv0 fi d174 71 d247 1 a247 4 sh MAKEDEV.local ;; *) echo $i: unknown device d249 1 @ 1.1 log @help "make distribution" along @ text @d3 1 a3 1 # $NetBSD: MAKEDEV,v 1.11 1995/09/30 21:59:57 thorpej Exp $ a41 2 # ct* HP300 HP-IB cartridge tape # mt* (Magnetic) 9-track reel tape d45 1 a45 1 # rd* HP300 HP-IB disks a48 2 # dca* HP200/300 single port serial interface # dcm* HP200/300 4 port serial mux interface a54 3 # grf* raw interface to HP300 graphics devices # ite* terminal emulator interface to HP300 graphics devices # hil HP300 HIL input devices d98 1 a98 1 ct*|mt*|st*) a100 2 ct*) name=ct; blk=0; chr=7;; mt*) name=mt; blk=1; chr=16;; d146 1 a146 1 ccd*|fd*|rd*|sd*|vnd*) a148 1 rd*) name=rd; blk=2; chr=9;; d183 8 a190 83 dca*) unit=`expr $i : 'dca\(.*\)'` case $unit in 0) mknod tty0 c 12 0 ;; *) echo bad unit for dca in: $i ;; esac ;; dcm*) unit=`expr $i : 'dcm\(.*\)'` case $unit in 0|1|2|3) eval `echo $unit | awk ' { unit = $1; u = 4 * $1 } END { for (i = 0; i < 4; i++) printf("mknod tty0%x c 15 %d; ",u+i,u+i); }'` ;; *) echo bad unit for dcm in: $i ;; esac ;; ite*) unit=`expr $i : 'ite\(.*\)'` case $unit in 0|1|2|3) mknod ttye${unit} c 13 ${unit} ;; *) echo bad unit for ite in: $i ;; esac ;; grf*) unit=`expr $i : 'grf\(.*\)'` case $unit in 0|1|2|3) mknod grf${unit} c 10 ${unit}; chmod 666 grf${unit} # echo "grf${unit}: use MAKEDEV.hpux to make HP-UX names for device" ;; *) echo bad unit for grf in: $i ;; esac ;; hil) for unit in 0 1 2 3 4 5 6 7 do mknod hil${unit} c 14 ${unit} if [ -f /usr/sbin/hilinfo ] then case `/usr/sbin/hilinfo -t hil${unit}` in mouse) if [ ! -f locator ] then ln hil${unit} locator fi ;; keyboard) if [ ! -f keyboard ] then ln hil${unit} keyboard fi ;; *) ;; esac fi done if [ ! -f /usr/sbin/hilinfo ] then ln hil1 keyboard ln hil3 locator fi chmod 666 hil* # echo "hil: use MAKEDEV.hpux to make HP-UX names for devices" ;; @