summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-09-17 19:28:03 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-09-17 19:28:03 -0400
commite7c8f81065eb9d3c11d81b73169118f8760f3791 (patch)
tree21fc4e2a16e6d4dee46f901ad42a694d4d4bc373
parent54a717b2078ef052c106e85bdf3b832e45e16c71 (diff)
udev: split out help and modernise a bit
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/udev/udevd.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 171bf83d05..f967f78172 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1024,6 +1024,20 @@ static void kernel_cmdline_options(struct udev *udev) {
}
}
+static void help(void) {
+ printf("%s [OPTIONS...]\n\n"
+ "Manages devices.\n\n"
+ " --daemon\n"
+ " --debug\n"
+ " --children-max=<maximum number of workers>\n"
+ " --exec-delay=<seconds to wait before executing RUN=>\n"
+ " --event-timeout=<seconds to wait before terminating an event>\n"
+ " --resolve-names=early|late|never\n"
+ " --version\n"
+ " --help\n"
+ , program_invocation_short_name);
+}
+
int main(int argc, char *argv[]) {
struct udev *udev;
sigset_t mask;
@@ -1100,16 +1114,7 @@ int main(int argc, char *argv[]) {
}
break;
case 'h':
- printf("Usage: udevd OPTIONS\n"
- " --daemon\n"
- " --debug\n"
- " --children-max=<maximum number of workers>\n"
- " --exec-delay=<seconds to wait before executing RUN=>\n"
- " --event-timeout=<seconds to wait before terminating an event>\n"
- " --resolve-names=early|late|never\n"
- " --version\n"
- " --help\n"
- "\n");
+ help();
goto exit;
case 'V':
printf("%s\n", UDEV_VERSION);