diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-05 13:19:55 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-05 13:19:55 +0100 |
commit | 5ac0162c3af95efa08a07b84ff62ad32842922c7 (patch) | |
tree | 3ff2ab0a9f2ecde655ec086d62cbedb05cd21ef8 /src/udev/udevadm-test.c | |
parent | 00b4ffdecbb39d849af65c0ab741be482325a4a9 (diff) |
udevadm,..: make --help output of udev tools more like the output of the various other tools
Diffstat (limited to 'src/udev/udevadm-test.c')
-rw-r--r-- | src/udev/udevadm-test.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c index d9d61b42d5..4922b5b6ac 100644 --- a/src/udev/udevadm-test.c +++ b/src/udev/udevadm-test.c @@ -31,6 +31,17 @@ #include "udev.h" #include "udev-util.h" +static void help(void) { + + printf("%s test OPTIONS <syspath>\n\n" + "Test an event run.\n" + " -h --help Show this help\n" + " --version Show package version\n" + " -a --action=ACTION Set action string\n" + " -N --resolve-names=early|late|never When to resolve names\n" + , program_invocation_short_name); +} + static int adm_test(struct udev *udev, int argc, char *argv[]) { int resolve_names = 1; char filename[UTIL_PATH_SIZE]; @@ -71,11 +82,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) { } break; case 'h': - printf("Usage: udevadm test OPTIONS <syspath>\n" - " -a,--action=ACTION set action string\n" - " -N,--resolve-names=early|late|never when to resolve names\n" - " -h,--help print this help string\n" - "\n"); + help(); exit(EXIT_SUCCESS); case '?': exit(EXIT_FAILURE); @@ -161,6 +168,6 @@ out: const struct udevadm_cmd udevadm_test = { .name = "test", .cmd = adm_test, - .help = "test an event run", + .help = "Test an event run", .debug = true, }; |