summaryrefslogtreecommitdiff
path: root/devio/MAKEDEV
blob: 356a5b0212f64d7806a7ab2bdf6c7ec375d95eb3 (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
#!/bin/sh
#
# Make standard devices
#

PATH=/bin

for I; do
  case "$I" in
    std)
      settrans -cf console /hurd/term console

      settrans -cf tty /hurd/magic tty

      settrans -cf null /hurd/null
      settrans -cf zero /hurd/null -z

      #settrans -cf stdin /hurd/magic fd/0
      #settrans -cf stdout /hurd/magic fd/1
      #settrans -cf stderr /hurd/magic fd/2
      ;;

   fd*|mt*)
      settrans -cf r$I /hurd/devio $I
      settrans -cf $I /hurd/devio -b $I
      ;;

   rd*|sd*|hd*)
      if expr $I : '[a-z]*[0-9][0-9]*\([a-z]*\)' > /dev/null; then
        settrans -cf r$I /hurd/devio $I
        settrans -cf $I /hurd/devio -b $I
      else
	echo 1>&2 $0: $I: Must supply a device number and partition
	exit 1
      fi
      ;;

    *)
      echo $0: $I: Unknown device
 esac
done