diff options
author | Alain Guibert | 2007-09-24 12:57:22 +0200 |
---|---|---|
committer | Karel Zak | 2007-10-26 01:02:44 +0200 |
commit | 8f5b978e531e7d02513334e3cbed018f7d24d98f (patch) | |
tree | a7beede6044835be942e6327059a242c2c52125a /hwclock | |
parent | mount: prevent loop mounting the same file twice (diff) | |
download | kernel-qcow2-util-linux-8f5b978e531e7d02513334e3cbed018f7d24d98f.tar.gz kernel-qcow2-util-linux-8f5b978e531e7d02513334e3cbed018f7d24d98f.tar.xz kernel-qcow2-util-linux-8f5b978e531e7d02513334e3cbed018f7d24d98f.zip |
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>
Diffstat (limited to 'hwclock')
-rw-r--r-- | hwclock/hwclock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c index bbacf5dc1..f138a9fa1 100644 --- a/hwclock/hwclock.c +++ b/hwclock/hwclock.c @@ -257,6 +257,7 @@ read_adjtime(struct adjtime *adjtime_p) { adjtime_p->not_adjusted = 0; adjtime_p->last_calib_time = 0; adjtime_p->local_utc = UNKNOWN; + adjtime_p->dirty = FALSE; /* don't create a zero adjfile */ return 0; } |