summaryrefslogtreecommitdiffstats
path: root/hwclock
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:28 +0100
committerKarel Zak2006-12-07 00:26:28 +0100
commit5213517f54c70a784c06ee85c066aa2b4f375c4b (patch)
treebd0b55ed9621bf27f70fc2e338a9816496246beb /hwclock
parentImported from util-linux-2.12k tarball. (diff)
downloadkernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.gz
kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.xz
kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.zip
Imported from util-linux-2.12l tarball.
Diffstat (limited to 'hwclock')
-rw-r--r--hwclock/Makefile1
-rw-r--r--hwclock/cmos.c1
-rw-r--r--hwclock/hwclock.812
-rw-r--r--hwclock/hwclock.c1
-rw-r--r--hwclock/kd.c1
-rw-r--r--hwclock/rtc.c1
6 files changed, 13 insertions, 4 deletions
diff --git a/hwclock/Makefile b/hwclock/Makefile
index 88aa50cd8..730a355a8 100644
--- a/hwclock/Makefile
+++ b/hwclock/Makefile
@@ -17,6 +17,7 @@ all: $(SBIN)
hwclock.o: hwclock.c
+hwclock.o cmos.o kd.o: ../defines.h
hwclock.o cmos.o rtc.o kd.o: clock.h
hwclock: hwclock.o cmos.o rtc.o kd.o
diff --git a/hwclock/cmos.c b/hwclock/cmos.c
index 8d497b27e..399a912c9 100644
--- a/hwclock/cmos.c
+++ b/hwclock/cmos.c
@@ -46,6 +46,7 @@
#include <unistd.h> /* for geteuid() */
#include <fcntl.h> /* for O_RDWR */
+#include <errno.h>
#include "../defines.h" /* for HAVE_sys_io_h */
#include "nls.h"
diff --git a/hwclock/hwclock.8 b/hwclock/hwclock.8
index 0d5f014c9..e3fcb4147 100644
--- a/hwclock/hwclock.8
+++ b/hwclock/hwclock.8
@@ -87,7 +87,7 @@ drift since the last time the clock was set or adjusted. See discussion
below.
.TP
.B \-\-getepoch
-Print out standard output the kernel's Hardware Clock epoch value.
+Print the kernel's Hardware Clock epoch value to standard output.
This is the number of years into AD to which a zero year value in the
Hardware Clock refers. For example, if you are using the convention
that the year counter in your Hardware Clock contains the number of
@@ -344,8 +344,11 @@ But don't be misled -- almost nobody cares what timezone the kernel
thinks it is in. Instead, programs that care about the timezone
(perhaps because they want to display a local time for you) almost
always use a more traditional method of determining the timezone: They
-use the TZ environment variable and/or the /usr/local/timezone
-directory, as explained in the man page for tzset(3). However, some
+use the TZ environment variable and/or the
+.I /usr/share/zoneinfo
+directory, as explained in the man page for
+.BR tzset (3).
+However, some
programs and fringe parts of the Linux kernel such as filesystems use
the kernel timezone value. An example is the vfat filesystem. If the
kernel timezone value is wrong, the vfat filesystem will report and
@@ -353,7 +356,8 @@ set the wrong timestamps on files.
.PP
.B hwclock
sets the kernel timezone to the value indicated by TZ and/or
-/usr/local/timezone when you set the System Time using the
+.I /usr/share/zoneinfo
+when you set the System Time using the
.B \-\-hctosys
option.
.PP
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c
index eeabc3726..7b7a4ef3b 100644
--- a/hwclock/hwclock.c
+++ b/hwclock/hwclock.c
@@ -82,6 +82,7 @@
#include <getopt.h>
#include <sysexits.h>
+#include "../defines.h" /* for HAVE_tm_gmtoff */
#include "clock.h"
#include "nls.h"
diff --git a/hwclock/kd.c b/hwclock/kd.c
index cac767888..2581fa5dd 100644
--- a/hwclock/kd.c
+++ b/hwclock/kd.c
@@ -12,6 +12,7 @@ probe_for_kd_clock() {
#include <unistd.h> /* for close() */
#include <fcntl.h> /* for O_RDONLY */
+#include <errno.h>
#include <sysexits.h>
#include <sys/ioctl.h>
diff --git a/hwclock/rtc.c b/hwclock/rtc.c
index cbb2dddea..a2aa0b825 100644
--- a/hwclock/rtc.c
+++ b/hwclock/rtc.c
@@ -1,6 +1,7 @@
/* rtc.c - Use /dev/rtc for clock access */
#include <unistd.h> /* for close() */
#include <fcntl.h> /* for O_RDONLY */
+#include <errno.h>
#include <sysexits.h>
#include <sys/ioctl.h>
#include <sys/time.h> /* for struct timeval */