diff options
-rw-r--r-- | util-linux/mdev.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 0b3e06cf1..c6be1b872 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -93,26 +93,6 @@ | |||
93 | //usage: "If /dev/mdev.seq file exists, mdev will wait for its value\n" | 93 | //usage: "If /dev/mdev.seq file exists, mdev will wait for its value\n" |
94 | //usage: "to match $SEQNUM variable. This prevents plug/unplug races.\n" | 94 | //usage: "to match $SEQNUM variable. This prevents plug/unplug races.\n" |
95 | //usage: "To activate this feature, create empty /dev/mdev.seq at boot." | 95 | //usage: "To activate this feature, create empty /dev/mdev.seq at boot." |
96 | //usage: | ||
97 | //usage:#define mdev_notes_usage "" | ||
98 | //usage: IF_FEATURE_MDEV_CONFIG( | ||
99 | //usage: "The mdev config file contains lines that look like:\n" | ||
100 | //usage: " hd[a-z][0-9]* 0:3 660\n\n" | ||
101 | //usage: "That's device name (with regex match), uid:gid, and permissions.\n\n" | ||
102 | //usage: IF_FEATURE_MDEV_EXEC( | ||
103 | //usage: "Optionally, that can be followed (on the same line) by a special character\n" | ||
104 | //usage: "and a command line to run after creating/before deleting the corresponding\n" | ||
105 | //usage: "device(s). The environment variable $MDEV indicates the active device node\n" | ||
106 | //usage: "(which is useful if it's a regex match). For example:\n\n" | ||
107 | //usage: " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" | ||
108 | //usage: "The special characters are @ (run after creating), $ (run before deleting),\n" | ||
109 | //usage: "and * (run both after creating and before deleting). The commands run in\n" | ||
110 | //usage: "the /dev directory, and use system() which calls /bin/sh.\n\n" | ||
111 | //usage: ) | ||
112 | //usage: "Config file parsing stops on the first matching line. If no config\n" | ||
113 | //usage: "entry is matched, devices are created with default 0:0 660. (Make\n" | ||
114 | //usage: "the last line match .* to override this.)\n\n" | ||
115 | //usage: ) | ||
116 | 96 | ||
117 | #include "libbb.h" | 97 | #include "libbb.h" |
118 | #include "xregex.h" | 98 | #include "xregex.h" |
@@ -134,20 +114,11 @@ | |||
134 | * (todo: explain "delete" and $FIRMWARE) | 114 | * (todo: explain "delete" and $FIRMWARE) |
135 | * | 115 | * |
136 | * If /etc/mdev.conf exists, it may modify /dev/device_name's properties. | 116 | * If /etc/mdev.conf exists, it may modify /dev/device_name's properties. |
137 | * /etc/mdev.conf file format: | ||
138 | * | ||
139 | * [-][subsystem/]device user:grp mode [>|=path]|[!] [@|$|*command args...] | ||
140 | * [-]@maj,min[-min2] user:grp mode [>|=path]|[!] [@|$|*command args...] | ||
141 | * [-]$envvar=val user:grp mode [>|=path]|[!] [@|$|*command args...] | ||
142 | * | 117 | * |
143 | * Leading minus in 1st field means "don't stop on this line", otherwise | 118 | * Leading minus in 1st field means "don't stop on this line", otherwise |
144 | * search is stopped after the matching line is encountered. | 119 | * search is stopped after the matching line is encountered. |
145 | * | 120 | * |
146 | * The device name or "subsystem/device" combo is matched against 1st field | 121 | * $envvar=regex format is useful for loading modules for hot-plugged devices |
147 | * (which is a regex), or maj,min is matched against 1st field, | ||
148 | * or specified environment variable (as regex) is matched against 1st field. | ||
149 | * | ||
150 | * $envvar=val format is useful for loading modules for hot-plugged devices | ||
151 | * which do not have driver loaded yet. In this case /sys/class/.../dev | 122 | * which do not have driver loaded yet. In this case /sys/class/.../dev |
152 | * does not exist, but $MODALIAS is set to needed module's name | 123 | * does not exist, but $MODALIAS is set to needed module's name |
153 | * (actually, an alias to it) by kernel. This rule instructs mdev | 124 | * (actually, an alias to it) by kernel. This rule instructs mdev |