chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shutdown: accept minutes argument without '+'
[elogind.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index 11379f6bb434f0abc33c5fca04611ac7522170e2..76a094383237922510da0658b9b8971feced3896 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-1033,6
+1033,8
@@
int main(int argc, char *argv[]) {
program_invocation_short_name = systemd;
prctl(PR_SET_NAME, systemd);
program_invocation_short_name = systemd;
prctl(PR_SET_NAME, systemd);
+ saved_argv = argv;
+ saved_argc = argc;
log_show_color(isatty(STDERR_FILENO) > 0);
log_show_location(false);
log_show_color(isatty(STDERR_FILENO) > 0);
log_show_location(false);
@@
-1050,15
+1052,18
@@
int main(int argc, char *argv[]) {
if (label_init() < 0)
goto finish;
if (label_init() < 0)
goto finish;
- if (hwclock_is_localtime()) {
+ if (hwclock_is_localtime()
> 0
) {
int min;
min = hwclock_apply_localtime_delta();
int min;
min = hwclock_apply_localtime_delta();
- log_info("Hwclock configured in localtime, applying delta of %i minutes to system time", min);
+ if (min < 0)
+ log_error("Failed to apply local time delta: %s", strerror(-min));
+ else
+ log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min);
}
} else {
arg_running_as = MANAGER_USER;
}
} else {
arg_running_as = MANAGER_USER;
- log_set_target(LOG_TARGET_
CONSOLE
);
+ log_set_target(LOG_TARGET_
AUTO
);
}
if (set_default_unit(SPECIAL_DEFAULT_TARGET) < 0)
}
if (set_default_unit(SPECIAL_DEFAULT_TARGET) < 0)