diff options
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r-- | util-linux/mdev.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index a970f91f2..2f225ac0b 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -7,6 +7,41 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | |||
11 | //usage:#define mdev_trivial_usage | ||
12 | //usage: "[-s]" | ||
13 | //usage:#define mdev_full_usage "\n\n" | ||
14 | //usage: " -s Scan /sys and populate /dev during system boot\n" | ||
15 | //usage: "\n" | ||
16 | //usage: "It can be run by kernel as a hotplug helper. To activate it:\n" | ||
17 | //usage: " echo /sbin/mdev > /proc/sys/kernel/hotplug\n" | ||
18 | //usage: IF_FEATURE_MDEV_CONF( | ||
19 | //usage: "It uses /etc/mdev.conf with lines\n" | ||
20 | //usage: "[-]DEVNAME UID:GID PERM" | ||
21 | //usage: IF_FEATURE_MDEV_RENAME(" [>|=PATH]") | ||
22 | //usage: IF_FEATURE_MDEV_EXEC(" [@|$|*PROG]") | ||
23 | //usage: ) | ||
24 | //usage: | ||
25 | //usage:#define mdev_notes_usage "" | ||
26 | //usage: IF_FEATURE_MDEV_CONFIG( | ||
27 | //usage: "The mdev config file contains lines that look like:\n" | ||
28 | //usage: " hd[a-z][0-9]* 0:3 660\n\n" | ||
29 | //usage: "That's device name (with regex match), uid:gid, and permissions.\n\n" | ||
30 | //usage: IF_FEATURE_MDEV_EXEC( | ||
31 | //usage: "Optionally, that can be followed (on the same line) by a special character\n" | ||
32 | //usage: "and a command line to run after creating/before deleting the corresponding\n" | ||
33 | //usage: "device(s). The environment variable $MDEV indicates the active device node\n" | ||
34 | //usage: "(which is useful if it's a regex match). For example:\n\n" | ||
35 | //usage: " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" | ||
36 | //usage: "The special characters are @ (run after creating), $ (run before deleting),\n" | ||
37 | //usage: "and * (run both after creating and before deleting). The commands run in\n" | ||
38 | //usage: "the /dev directory, and use system() which calls /bin/sh.\n\n" | ||
39 | //usage: ) | ||
40 | //usage: "Config file parsing stops on the first matching line. If no config\n" | ||
41 | //usage: "entry is matched, devices are created with default 0:0 660. (Make\n" | ||
42 | //usage: "the last line match .* to override this.)\n\n" | ||
43 | //usage: ) | ||
44 | |||
10 | #include "libbb.h" | 45 | #include "libbb.h" |
11 | #include "xregex.h" | 46 | #include "xregex.h" |
12 | 47 | ||