diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2015-11-05 13:44:14 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2015-11-05 13:44:14 +0100 |
commit | 6ff6f4d851ba5b8e6f07a8e029986f13c2e63b9d (patch) | |
tree | fcf046121ee35dd387ac91511d35307b4e49d1bd /src | |
parent | 35607a8d1c843d352f61b6108a147e84fc6a8b00 (diff) |
timesync: return negative errno from manager_adjust_clock() on error
Diffstat (limited to 'src')
-rw-r--r-- | src/timesync/timesyncd-manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index b4995c3064..8dca538b3b 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -370,7 +370,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) { r = clock_adjtime(CLOCK_REALTIME, &tmx); if (r < 0) - return r; + return -errno; touch("/var/lib/systemd/clock"); @@ -667,7 +667,7 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re m->sync = true; r = manager_adjust_clock(m, offset, leap_sec); if (r < 0) - log_error_errno(errno, "Failed to call clock_adjtime(): %m"); + log_error_errno(r, "Failed to call clock_adjtime(): %m"); } log_debug("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+ippm%s", |