Commit graph

18 commits

Author SHA1 Message Date
Matthias Koenig
0b0beca2bb hwclock: omit warning about drift if --noadjfile given
Currently, if hwclock is given the --noadjfile option it will
nevertheless display information about the drift rate when invoked with
the --debug option.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2008-06-16 12:39:09 +02:00
Karel Zak
da82f6fe2f hwclock: add --adjfile=path option
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-09 11:50:46 +02:00
Alain Guibert
8f5b978e53 hwclock: do not create a zero adjfile
When hwclock --hctosys is started very early during the system startup,
with / still mounted read-only, and there was no /etc/adjtime file,
hwclock fails creating a default adjfile full of zeroes, and prints an
error message. I believe that such zero adjfile is not necessary,
because it means exactly the same as no adjfile at all.

The attached patch prevents creation of a zero adjfile, of course unless
something gets changed (this never happens during a --hctosys).

Signed-off-by: Alain Guibert <alguibert+ulng@free.fr>
2007-10-26 01:02:44 +02:00
Karel Zak
8e522bb7e9 remove hardcoded package name from some utils
We have PACKAGE_STRING in config.h that includes package name and
version. It's better to use this macro that hardcoded strings.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-27 12:12:00 +02:00
Karel Zak
72bcf1898b hwclock: make ggc happy and check return values from fgets, read and write
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-21 16:21:34 +01:00
Karel Zak
9abb26854c hwclock: remove tailing white-spaces and clean up clock.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-21 15:05:58 +01:00
Karel Zak
88058a71e2 hwclock: add support for audit system
If you compile --with-audit the hwclock tool reports changes in sys/hw clock to
audit system. The real long-term and final solution is probably add hooks for
/dev/rtc to kernel, but it's not implemented yet.

Signed-off-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-21 14:12:05 +01:00
Karel Zak
99c392d8ba hwclock: fix --systohc sets clock 0.5 seconds slow
quote from rh150493:

	The kernel code, when setting the BIOS clock notes that the clock time
	ticks to the next second 0.5 seconds after adjusting it  (see
	linux/arch/i386/kernel/time.c).

	hwclock --systohc sets the CMOS clock at the 1 second boundry and thus
	causes the clock to be wrong by 500ms each time it is reset.  If the
	clock is set every shutdown then the clock will have a reboot-count
	related drift as well as the natural drift problems of the clock. Note
	that this also mucks up the drift calculations, of course.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-20 00:32:37 +01:00
Karel Zak
88681c5f1a hwclock: add --rtc=<path> option and support for /dev/rtc0
The patch to allow "hwclock --rtc /dev/rtc1" and so on,
since "/dev/rtc" may not be there and "/dev/rtc0" may not be
the right answer either.

The "--rtc" is compatible with next Bryan Henderson's hwclock
versions.

Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-19 10:14:13 +01:00
Karel Zak
48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak
5213517f54 Imported from util-linux-2.12l tarball. 2006-12-07 00:26:28 +01:00
Karel Zak
95f1bdeee4 Imported from util-linux-2.11x tarball. 2006-12-07 00:26:05 +01:00
Karel Zak
f0c8eda12c Imported from util-linux-2.11u tarball. 2006-12-07 00:26:00 +01:00
Karel Zak
63cccae468 Imported from util-linux-2.11t tarball. 2006-12-07 00:25:58 +01:00
Karel Zak
ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak
e8f2641919 Imported from util-linux-2.11m tarball. 2006-12-07 00:25:49 +01:00
Karel Zak
364cda4857 Imported from util-linux-2.11f tarball. 2006-12-07 00:25:48 +01:00
Karel Zak
66ee8158b6 Imported from util-linux-2.10s tarball. 2006-12-07 00:25:44 +01:00
Renamed from clock/hwclock.c (Browse further)