summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock-rtc.c
diff options
context:
space:
mode:
authorJ William Piggott2017-08-28 02:26:41 +0200
committerJ William Piggott2017-09-03 18:03:10 +0200
commitc47a8f2a87b409ace58f9062bb3f37130f18da81 (patch)
treeae43d06020c9bf2fa5178131356f74f6638bbb01 /sys-utils/hwclock-rtc.c
parenttests: update sfdisk wipe test (diff)
downloadkernel-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.c5
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)