aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/paride/mkd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/block/paride/mkd
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/block/paride/mkd')
-rw-r--r--drivers/block/paride/mkd30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/block/paride/mkd b/drivers/block/paride/mkd
new file mode 100644
index 000000000000..971f099b40aa
--- /dev/null
+++ b/drivers/block/paride/mkd
@@ -0,0 +1,30 @@
1#!/bin/bash
2#
3# mkd -- a script to create the device special files for the PARIDE subsystem
4#
5# block devices: pd (45), pcd (46), pf (47)
6# character devices: pt (96), pg (97)
7#
8function mkdev {
9 mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1
10}
11#
12function pd {
13 D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) )
14 mkdev pd$D b 45 $[ $1 * 16 ]
15 for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 do mkdev pd$D$P b 45 $[ $1 * 16 + $P ]
17 done
18}
19#
20cd /dev
21#
22for u in 0 1 2 3 ; do pd $u ; done
23for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done
24for u in 0 1 2 3 ; do mkdev pf$u b 47 $u ; done
25for u in 0 1 2 3 ; do mkdev pt$u c 96 $u ; done
26for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done
27for u in 0 1 2 3 ; do mkdev pg$u c 97 $u ; done
28#
29# end of mkd
30