Package: util-linux
Version: 2.12r-19etch1
Severity: normal
File: /sbin/hwclock
Hello,
I have a system here with an rtc that knows when it's not set up
correctly and so
ioctl(fd, RTC_RD_TIME, &rtc_time);
returns -1, errno=EINVAL. The same holds for
ioctl(fd, RTC_UIE_ON, 0);
It's a pity that hwclock first tries to read the clock when running
hwclock --systohc --noadjfile --utc
and exits as this fails. I cannot see a reason to read first in that
case. Probably the call to synchronize_to_clock_tick() in
manipulate_clock should be skipped if ((set || systohc) && !noadjfile)
and
read_hardware_clock(...)
should be substituted by:
if (show || adjust || hctosys || !noadjfile)
read_hardware_clock(...)
else
hclock_valid = FALSE
Note that I didn't test if this change even compiles.
Best regards
Uwe
-- System Information:
Debian Release: 4.0
APT prefers proposed-updates
APT policy: (900, 'proposed-updates'), (900, 'stable'), (300,
'testing-proposed-updates'), (300, 'testing'), (200, 'unstable'), (2,
'experimental')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-1-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages util-linux depends on:
ii lib 2.7-10 GNU C Library: Shared libraries
ii lib 5.6+20080308-1 Shared libraries for terminal hand
ii lib 2.1.3-3 The S-Lang programming library - r
ii lib 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 universally unique id library
ii lsb 3.1-23.2etch1 Linux Standard Base 3.1 init scrip
ii tzd 2008b-1 time zone and daylight-saving time
ii zli 1:1.2.3.3.dfsg-12 compression library - runtime
util-linux recommends no packages.
-- no debconf information
--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]