From c47a8f2a87b409ace58f9062bb3f37130f18da81 Mon Sep 17 00:00:00 2001 From: J William Piggott Date: Sun, 27 Aug 2017 20:26:41 -0400 Subject: 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 --- sys-utils/hwclock-rtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys-utils/hwclock-rtc.c') 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 #include #include -#include #include #include #include @@ -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) -- cgit v1.2.3-55-g7522