diff options
author | Denys Vlasenko | 2020-11-22 14:43:35 +0100 |
---|---|---|
committer | Denys Vlasenko | 2020-11-22 14:43:35 +0100 |
commit | 1c9cd9b71b777bcd23879ac5ad24f391307182c7 (patch) | |
tree | 9b7c3801f0c5a5721bac6b6179fd90270096ae31 | |
parent | 768153bf8cc84a1a53166a9fe538de9484cdc8d1 (diff) | |
download | busybox-1c9cd9b71b777bcd23879ac5ad24f391307182c7.zip busybox-1c9cd9b71b777bcd23879ac5ad24f391307182c7.tar.gz |
mdev: clean up
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mdev.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 66cff6e..2cf98b1 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -80,18 +80,16 @@ //kbuild:lib-$(CONFIG_MDEV) += mdev.o //usage:#define mdev_trivial_usage -//usage: "[-Sv] " IF_FEATURE_MDEV_DAEMON("[") "[-s]" IF_FEATURE_MDEV_DAEMON(" | [-df]]") +//usage: "[-vS] " IF_FEATURE_MDEV_DAEMON("{ ") "[-s]" IF_FEATURE_MDEV_DAEMON(" | [-df] }") //usage:#define mdev_full_usage "\n\n" -//usage: "mdev -s is to be run during boot to scan /sys and populate /dev.\n" +//usage: " -v verbose\n" +//usage: " -S log to syslog too\n" +//usage: " -s scan /sys and populate /dev\n" //usage: IF_FEATURE_MDEV_DAEMON( -//usage: "mdev -d[f]: daemon, listen on netlink.\n" -//usage: " -f: stay in foreground.\n" +//usage: " -d daemon, listen on netlink\n" +//usage: " -f stay in foreground\n" //usage: ) //usage: "\n" -//usage: "optional arguments:\n" -//usage: " -S: Log to syslog too\n" -//usage: " -v: Increase log verbosity\n" -//usage: "\n" //usage: "Bare mdev is a kernel hotplug helper. To activate it:\n" //usage: " echo /sbin/mdev >/proc/sys/kernel/hotplug\n" //usage: IF_FEATURE_MDEV_CONF( @@ -1281,7 +1279,9 @@ int mdev_main(int argc UNUSED_PARAM, char **argv) #if ENABLE_FEATURE_MDEV_DAEMON if (opt & MDEV_OPT_DAEMON) { - // there is no point in write()ing to /dev/null + int fd; + + /* there is no point in write()ing to /dev/null */ if (!(opt & MDEV_OPT_FOREGROUND)) logmode &= ~LOGMODE_STDIO; @@ -1290,7 +1290,7 @@ int mdev_main(int argc UNUSED_PARAM, char **argv) * after initial scan so that caller can be sure everything * is up-to-date when mdev process returns. */ - int fd = daemon_init(temp); + fd = daemon_init(temp); if (!(opt & MDEV_OPT_FOREGROUND)) bb_daemonize_or_rexec(0, argv); |