Name Date Size #Lines LOC

..--

READMEH A D05-Jun-20251.2 KiB3625

makedevs.cH A D05-Jun-202515.8 KiB648537

makedevs.mkH A D05-Jun-2025835 3219

README

1When building a target filesystem, it is desirable to not have to
2become root and then run 'mknod' a thousand times.  Using a device
3table you can create device nodes and directories "on the fly".
4
5You can do all sorts of interesting things with a device table file.
6For example, if you want to adjust the permissions on a particular
7file you can just add an entry like:
8
9  /sbin/foobar f 2755 0 0 - - - - -
10
11and (assuming the file /sbin/foobar exists) it will be made setuid
12root (regardless of what its permissions are on the host filesystem.
13
14Furthermore, you can use a single table entry to create a many device
15minors.  For example, if I wanted to create /dev/hda and
16/dev/hda[0-15] I could just use the following two table entries:
17
18  /dev/hda b 640 0 0 3 0 0 0 -
19  /dev/hda b 640 0 0 3 1 1 1 15
20
21Device table entries take the form of:
22
23<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
24
25where name is the file name,  type can be one of:
26
27      f: A regular file
28      d: Directory
29      c: Character special device file
30      b: Block special device file
31      p: Fifo (named pipe)
32
33uid is the user id for the target file, gid is the group id for the
34target file.  The rest of the entries (major, minor, etc) apply only
35to device special files.
36