summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/hwclock-cmos.c6
-rw-r--r--sys-utils/hwclock.h1
2 files changed, 1 insertions, 6 deletions
diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index 6227b94c0..cdbc88b03 100644
--- a/sys-utils/hwclock-cmos.c
+++ b/sys-utils/hwclock-cmos.c
@@ -45,7 +45,6 @@
* tm_isdst >0: yes, 0: no, <0: unknown
*/
-#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
@@ -390,12 +389,9 @@ static int get_permissions_cmos(void)
if (rc == IOPL_NOT_IMPLEMENTED) {
warnx(_("ISA port access is not implemented"));
} else if (rc != 0) {
- rc = errno;
warn(_("iopl() port access failed"));
- if (rc == EPERM && geteuid())
- warnx(_("root privileges may be required"));
}
- return rc ? 1 : 0;
+ return rc;
}
static struct clock_ops cmos_interface = {
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
index a1ef80cee..8843501f3 100644
--- a/sys-utils/hwclock.h
+++ b/sys-utils/hwclock.h
@@ -1,7 +1,6 @@
#ifndef HWCLOCK_CLOCK_H
#define HWCLOCK_CLOCK_H
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>