summaryrefslogtreecommitdiff
path: root/audio/oss/files/MAKEDEV.oss
blob: 04d44ef7197c5665618de2fb3c13741ad0f9472a (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/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 $*