#!/bin/sh - # # $NetBSD: MAKEDEV.oss,v 1.2 2002/10/03 08:09:05 jlam Exp $ # PATH=/sbin:/usr/sbin:/bin:/usr/bin umask 77 # OSS devices have major number 30 major=30 makedev() { for i do case $i in all) makedev audio dsp dmfm midi mixer music sequencer sndstat ;; audio) makedev audio0 audio1 audio2 audio3 audio4 audio5 audio6 audio7 makedev audio8 audio9 audio10 audio11 audio12 audio13 audio14 audio15 ;; dmfm) makedev dmfm0 ln -fs dsp dmdsp0 ln -fs midi dmmidi0 ;; dsp) makedev dsp0 dsp1 dsp2 dsp3 dsp4 dsp5 dsp6 dsp7 dsp8 dsp9 makedev dsp10 dsp11 dsp12 dsp13 dsp14 dsp15 makedev dspW0 dspW1 dspW2 dspW3 dspW4 dspW5 dspW6 dspW7 dspW8 dspW9 makedev dspW10 dspW11 dspW12 dspW13 dspW14 dspW15 rm -f dsp ln -fs dsp0 dsp rm -f dspW ln -fs dspW0 dspW rm -f sound ln -fs dsp sound ;; midi) makedev midi00 midi01 midi02 midi03 midi04 ln -fs midi00 midi ;; mixer) makedev mixer0 mixer1 mixer2 mixer3 mixer4 ;; audio*) unit=${i#audio} audio=audio$unit rm -f $audio mknod $audio c $major $(($unit * 16 + 4)) chmod 666 $audio ;; dmfm*) unit=${i#dmfm} dmfm=dmfm$unit rm -f $dmfm mknod $dmfm c $major $(($unit * 16 + 7)) chmod 666 $dmfm ;; dspW*) unit=${i#dspW} dspW=dspW$unit rm -f $dspW mknod $dspW c $major $(($unit * 16 + 5)) chmod 666 $dspW ;; dsp*) unit=${i#dsp} dsp=dsp$unit rm -f $dsp mknod $dsp c $major $(($unit * 16 + 3)) chmod 666 $dsp ;; midi*) unit=${i#midi} midi=midi$unit rm -f $midi mknod $midi c $major $(($unit * 16 + 2)) chmod 666 $midi ;; mixer*) unit=${i#mixer} mixer=mixer$unit rm -f $mixer mknod $mixer c $major $(($unit * 16 + 0)) chmod 666 $mixer ;; music) rm -f music mknod music c $major 8 chmod 666 music ;; sequencer) rm -f sequencer mknod sequencer c $major 1 chmod 666 sequencer ln -fs music sequencer2 ;; sndstat) rm -f sndstat mknod sndstat c $major 6 chmod 666 sndstat ;; *) echo $i: unknown device ;; esac done } makedev $*