diff options
author | Sami Kerola | 2016-07-17 17:14:16 +0200 |
---|---|---|
committer | Sami Kerola | 2017-02-05 00:39:37 +0100 |
commit | 0f32118e70c097f54fe706cb34adeaf9010a6a7a (patch) | |
tree | 50fef94261958921abdb01dfcdd09b4349ee3663 /sys-utils/hwclock.c | |
parent | hwclock: initialize struct adjtime members (diff) | |
download | kernel-qcow2-util-linux-0f32118e70c097f54fe706cb34adeaf9010a6a7a.tar.gz kernel-qcow2-util-linux-0f32118e70c097f54fe706cb34adeaf9010a6a7a.tar.xz kernel-qcow2-util-linux-0f32118e70c097f54fe706cb34adeaf9010a6a7a.zip |
hwclock: use symbolic magic values passed in between functions
The manipulate_clock() is seeing return value from
busywait_for_rtc_clock_tick().
And the get_permissions_cmos() can see i386_iopl() return value.
Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r-- | sys-utils/hwclock.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 7b363b567..e4885d563 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1226,14 +1226,12 @@ manipulate_clock(const struct hwclock_control *ctl, const time_t set_time, rc = synchronize_to_clock_tick(ctl); /* - * 2 = synchronization timeout. We don't - * error out if the user is attempting to - * set the RTC - the RTC could be - * functioning but contain invalid time data - * so we still want to allow a user to set - * the RTC time. + * We don't error out if the user is attempting to set the + * RTC and synchronization timeout happens - the RTC could + * be functioning but contain invalid time data so we still + * want to allow a user to set the RTC time. */ - if (rc && rc != 2 && !ctl->set && !ctl->systohc) + if (rc == RTC_BUSYWAIT_FAILED && !ctl->set && !ctl->systohc) return EX_IOERR; gettimeofday(&read_time, NULL); |