From 6b5ad000aba61a5312b5c3fac7dd85a0d33816af Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 16 Aug 2010 17:12:35 +0200 Subject: 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 --- src/shutdownd.c | 2 +- src/systemctl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/shutdownd.c b/src/shutdownd.c index 241c4327a6..751a1a59b8 100644 --- a/src/shutdownd.c +++ b/src/shutdownd.c @@ -88,7 +88,7 @@ static int read_packet(int fd, struct shutdownd_command *_c) { } if (n != sizeof(c)) { - log_warning("Message has invaliud size. Ignoring"); + log_warning("Message has invalid size. Ignoring"); return 0; } 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) -- cgit v1.2.3-54-g00ecf