summaryrefslogtreecommitdiffstats
path: root/scripts/MAKEDEV.ide
blob: feecb99bb865be7a42e84e1401f4e3bbbf4dbf07 (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
#!/bin/sh
#
# This script creates the proper /dev/ entries for IDE devices
# on the primary, secondary, tertiary, and quaternary interfaces.
# See ../Documentation/ide.txt for more information.
#
makedev () {
	rm -f /dev/$1
	echo mknod /dev/$1 $2 $3 $4
	     mknod /dev/$1 $2 $3 $4
	chown root:disk /dev/$1
	chmod 660 /dev/$1
}

makedevs () {
	rm -f /dev/$1*
	makedev $1 b $2 $3
	for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
	do
		makedev $1$part b $2 `expr $3 + $part`
	done
}

makedevs hda  3 0
makedevs hdb  3 64
makedevs hdc 22 0
makedevs hdd 22 64
makedevs hde 33 0
makedevs hdf 33 64
makedevs hdg 34 0
makedevs hdh 34 64
makedevs hdi 56 0
makedevs hdj 56 64
makedevs hdk 57 0
makedevs hdl 57 64
makedevs hdm 88 0
makedevs hdn 88 64
makedevs hdo 89 0
makedevs hdp 89 64
makedevs hdq 90 0
makedevs hdr 90 64
makedevs hds 91 0
makedevs hdt 91 64

for tape in 0 1 2 3 4 5 6 7
do
	makedev ht$tape c 37 $tape
	makedev nht$tape c 37 `expr $tape + 128`
done