diff options
author | J William Piggott | 2017-08-28 02:26:41 +0200 |
---|---|---|
committer | J William Piggott | 2017-09-03 18:03:10 +0200 |
commit | c47a8f2a87b409ace58f9062bb3f37130f18da81 (patch) | |
tree | ae43d06020c9bf2fa5178131356f74f6638bbb01 /sys-utils/hwclock-rtc.c | |
parent | tests: update sfdisk wipe test (diff) | |
download | kernel-qcow2-util-linux-c47a8f2a87b409ace58f9062bb3f37130f18da81.tar.gz kernel-qcow2-util-linux-c47a8f2a87b409ace58f9062bb3f37130f18da81.tar.xz kernel-qcow2-util-linux-c47a8f2a87b409ace58f9062bb3f37130f18da81.zip |
hwclock: remove sysexits.h
sysexits.h was introduced in v2.11t prior to util-linux-ng, with the
HISTORY entry: * hwclock: minor polishing.
So there was no specific issue solved by adding it. Its use was never
documented so it should be safe to remove.
Also, fix return values being used for the exit status that were not
magic constants (portability issue).
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock-rtc.c')
-rw-r--r-- | sys-utils/hwclock-rtc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c index c50011aec..62e432937 100644 --- a/sys-utils/hwclock-rtc.c +++ b/sys-utils/hwclock-rtc.c @@ -6,7 +6,6 @@ #include <fcntl.h> #include <stdio.h> #include <stdlib.h> -#include <sysexits.h> #include <sys/ioctl.h> #include <sys/select.h> #include <sys/time.h> @@ -149,7 +148,7 @@ static int open_rtc_or_exit(const struct hwclock_control *ctl) if (rtc_fd < 0) { warn(_("cannot open rtc device")); - hwclock_exit(ctl, EX_OSFILE); + hwclock_exit(ctl, EXIT_FAILURE); } return rtc_fd; } @@ -356,7 +355,7 @@ static int set_hardware_clock_rtc(const struct hwclock_control *ctl, if (rc == -1) { warn(_("ioctl(%s) to %s to set the time failed"), ioctlname, rtc_dev_name); - hwclock_exit(ctl, EX_IOERR); + hwclock_exit(ctl, EXIT_FAILURE); } if (ctl->debug) |