aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-22 14:11:12 +0000
committerRon Yorston <rmy@pobox.com>2012-03-22 14:11:12 +0000
commit67758035a4fe040c6ac69b39d61bcd6bddd7b827 (patch)
treea4a1db7f54c16d12fabe2626b8f1e235cd694e9e /util-linux/mdev.c
parent811c449748d5bd0505f8510e5582892f94ac0cda (diff)
parentb83c9704128dd106071184e4b00335a3b8486857 (diff)
downloadbusybox-w32-67758035a4fe040c6ac69b39d61bcd6bddd7b827.tar.gz
busybox-w32-67758035a4fe040c6ac69b39d61bcd6bddd7b827.tar.bz2
busybox-w32-67758035a4fe040c6ac69b39d61bcd6bddd7b827.zip
Merge commit 'b83c9704128dd106071184e4b00335a3b8486857' into merge
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c35
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