diff options
author | J William Piggott | 2017-04-10 19:39:49 +0200 |
---|---|---|
committer | J William Piggott | 2017-04-10 20:22:30 +0200 |
commit | 657a55681a1da0bd0388c0cddf8b0874a2e5e0b5 (patch) | |
tree | 968316c4ccc12fc4795052fad44da16f543c5409 /sys-utils/hwclock.c | |
parent | agetty: various man-page fixes (diff) | |
download | kernel-qcow2-util-linux-657a55681a1da0bd0388c0cddf8b0874a2e5e0b5.tar.gz kernel-qcow2-util-linux-657a55681a1da0bd0388c0cddf8b0874a2e5e0b5.tar.xz kernel-qcow2-util-linux-657a55681a1da0bd0388c0cddf8b0874a2e5e0b5.zip |
hwclock: use errtryhelp()
* sys-utils/hwclock.c: use errtryhelp() instead of usage().
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r-- | sys-utils/hwclock.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 3875bcc54..a99eb6d60 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1479,9 +1479,9 @@ int main(int argc, char **argv) out_version(); return 0; case 'h': /* --help */ - case '?': - default: usage(&ctl, NULL); + default: + errtryhelp(EXIT_FAILURE); } } @@ -1497,9 +1497,8 @@ int main(int argc, char **argv) } #endif if (argc > 0) { - usage(&ctl, _("%s takes no non-option arguments. " - "You supplied %d.\n"), program_invocation_short_name, - argc); + warnx(_("%d too many arguments given"), argc); + errtryhelp(EXIT_FAILURE); } if (!ctl.adj_file_name) |