hwclock --get foobar hwclock: 3 too many arguments given Fixed: hwclock --get foobar hwclock: 1 too many arguments given Signed-off-by: J William Piggott <elseifthen@xxxxxxx> --- sys-utils/hwclock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 9745158..9b313cf 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1448,9 +1448,10 @@ int main(int argc, char **argv) } } - if (argc > optind) { + argc -= optind; + if (argc > 0) { warnx(_("%d too many arguments given"), argc); - errtryhelp(EXIT_FAILURE); + errtryhelp(EX_USAGE); } if (!ctl.adj_file_name) -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html