1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

udev: split out help and modernise a bit

This commit is contained in:
Tom Gundersen 2014-09-12 14:18:06 +02:00
parent f70ca25ae0
commit ed216e1ff0

View File

@ -997,6 +997,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;
@ -1074,16 +1088,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", VERSION);