X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ftimedate%2Ftimedatectl.c;h=9b81513c75456664b2749c5898318b2a54e470d5;hp=6a36af04f7f4c7cf413954b8a84809abe09da84f;hb=145b1f799ff6712f333cef92c44218254a1320c5;hpb=d5d217eae1b3ba978c4ddd6a2ef2de4621329662 diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 6a36af04f..9b81513c7 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -214,8 +214,10 @@ static int show_status(sd_bus *bus, char **args, unsigned n) { "/org/freedesktop/timedate1", map, &info); - if (r < 0) + if (r < 0) { + log_error("Failed to query server: %s", strerror(-r)); goto fail; + } print_status_info(&info); @@ -410,21 +412,20 @@ static int help(void) { printf("%s [OPTIONS...] COMMAND ...\n\n" "Query or change system time and date settings.\n\n" - " -h --help Show this help\n" - " --version Show package version\n" - " --no-pager Do not pipe output into a pager\n" - " --no-ask-password Do not prompt for password\n" - " -H --host=[USER@]HOST Operate on remote host\n" - " -M --machine=CONTAINER Operate on local container\n" - " --adjust-system-clock\n" - " Adjust system clock when changing local RTC mode\n\n" + " -h --help Show this help\n" + " --version Show package version\n" + " --no-pager Do not pipe output into a pager\n" + " --no-ask-password Do not prompt for password\n" + " -H --host=[USER@]HOST Operate on remote host\n" + " -M --machine=CONTAINER Operate on local container\n" + " --adjust-system-clock Adjust system clock when changing local RTC mode\n\n" "Commands:\n" - " status Show current time settings\n" - " set-time TIME Set system time\n" - " set-timezone ZONE Set system timezone\n" - " list-timezones Show known timezones\n" - " set-local-rtc BOOL Control whether RTC is in local time\n" - " set-ntp BOOL Control whether NTP is enabled\n", + " status Show current time settings\n" + " set-time TIME Set system time\n" + " set-timezone ZONE Set system timezone\n" + " list-timezones Show known timezones\n" + " set-local-rtc BOOL Control whether RTC is in local time\n" + " set-ntp BOOL Control whether NTP is enabled\n", program_invocation_short_name); return 0;