diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-07 14:48:33 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-07 14:48:33 +0200 |
commit | e5931bb7d86226a3823bdf5f4ec01c857827d386 (patch) | |
tree | 728b3e9b4147a86a8ff00f47111ac1ce83e363c0 /udev/udevadm.c | |
parent | f640b32fddfc45210361813b50c629a80d2889d2 (diff) |
udevadm: add --version --help options to man page, hide them as commands
Diffstat (limited to 'udev/udevadm.c')
-rw-r--r-- | udev/udevadm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/udev/udevadm.c b/udev/udevadm.c index e4f2420546..bfa704ef21 100644 --- a/udev/udevadm.c +++ b/udev/udevadm.c @@ -63,7 +63,8 @@ static int help(struct udev *udev, int argc, char *argv[]) printf("Usage: udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n"); for (cmd = cmds; cmd->name != NULL; cmd++) - printf(" %-12s %s\n", cmd->name, cmd->help); + if (cmd->help != NULL) + printf(" %-12s %s\n", cmd->name, cmd->help); printf("\n"); return 0; } @@ -103,12 +104,10 @@ static const struct command cmds[] = { { .name = "version", .cmd = version, - .help = "print the version number", }, { .name = "help", .cmd = help, - .help = "print this help text", }, {} }; @@ -210,7 +209,8 @@ int main(int argc, char *argv[]) } } - fprintf(stderr, "unknown command, try udevadm help\n\n"); + fprintf(stderr, "missing or unknown command\n\n"); + help(udev, argc, argv); rc = 2; out: sysfs_cleanup(); |