diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-16 17:12:35 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-16 17:12:40 +0200 |
commit | 6b5ad000aba61a5312b5c3fac7dd85a0d33816af (patch) | |
tree | 312d5d377c0968b8724b06bbb95a2a38f9173521 /src/systemctl.c | |
parent | 5dc50792ac1bc627bf9b50d259b4e7546b3f8d86 (diff) |
shutdown: if now time argument is passed, imply +1 not +0
That should friendlier for folks who just run "shutdown" to figure out
the command line arguments...
https://bugzilla.redhat.com/show_bug.cgi?id=624149
Diffstat (limited to 'src/systemctl.c')
-rw-r--r-- | src/systemctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index e517031cea..2b34798d06 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4233,11 +4233,13 @@ static int shutdown_parse_argv(int argc, char *argv[]) { } } - if (argc > optind) + if (argc > optind) { if ((r = parse_time_spec(argv[optind], &arg_when)) < 0) { log_error("Failed to parse time specification: %s", argv[optind]); return r; } + } else + arg_when = USEC_PER_MINUTE; /* We skip the time argument */ if (argc > optind + 1) |