r = get_user_creds(&user, &uid, &gid, NULL, NULL);
if (r < 0) {
- log_error("Cannot resolve user name %s: %s", user, strerror(-r));
+ log_error_errno(-r, "Cannot resolve user name %s: %m", user);
goto finish;
}
r = manager_new(&m);
if (r < 0) {
- log_error("Failed to allocate manager: %s", strerror(-r));
+ log_error_errno(-r, "Failed to allocate manager: %m");
goto finish;
}
r = manager_parse_config_file(m);
if (r < 0)
- log_warning("Failed to parse configuration file: %s", strerror(-r));
+ log_warning_errno(-r, "Failed to parse configuration file: %m");
log_debug("systemd-timesyncd running as pid %lu", (unsigned long) getpid());
sd_notify(false,
r = sd_event_loop(m->event);
if (r < 0) {
- log_error("Failed to run event loop: %s", strerror(-r));
+ log_error_errno(-r, "Failed to run event loop: %m");
goto finish;
}