| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit:
docs: remove duplicated text
docs: require kernel support before accepting use of it
docs: note about independent super block structs
docs: add libmount & libblkid debug instructions
Documentation: add debugging doc
arch: start using arch as a usage() example
docs: new file Documentation/release-schedule.txt
docs: move setuid information from reame to hwclock.8
docs: clean up old readme files
docs: copy contributors from legacy files to AUTHORS
docs: new file Documentation/howto-man-page.txt
docs: new file Documentation/source-code-management.txt
docs: new file Documentation/howto-contribute.txt
docs: new file Documentation/howto-compilation.txt
docs: tell what the Documentation/ is about
docs: add usage() howto for contributors
docs: Documentation directory added
docs: remove README.clear
|
| |
| |
| |
| | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move readme, licence, change log, relese notes and other
supplementary files to a Documentation directory. This commit
does not change contents of any other but few Makefile.am files.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.
Also improve here and there the one-line program description.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Also improve the synopsis and some wording and a bit of formatting,
add the --help option, and say that --show is the default function.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|/
|
|
|
|
|
|
| |
Also do it at sensible boundaries, improve some of the wording, and
indent continuation lines for clarity. Also document -V instead of
-v for --version, to conform to the majority of utilities.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
|
|
|
|
| |
... to keep 'make checkconfig' happy.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Instead atoi() use strtoul_or_err().
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
In addition `long only' options are made unreachable by using
8-bit characters.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
The only variable found causing `conditional jump or move depends
on uninitialized value' is fixed.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hwclock.c: In function 'manipulate_epoch':
hwclock.c:1299:29: warning: unused parameter 'getepoch' [-Wunused-parameter]
hwclock.c:1299:50: warning: unused parameter 'setepoch' [-Wunused-parameter]
hwclock.c:1300:14: warning: unused parameter 'epoch_opt' [-Wunused-parameter]
hwclock.c:1300:36: warning: unused parameter 'testing' [-Wunused-parameter]
hwclock.c: In function 'usage':
hwclock.c:1373:1: warning: embedding a directive within macro arguments is not portable [enabled by default]
hwclock.c:1377:1: warning: embedding a directive within macro arguments is not portable [enabled by default]
hwclock.c:1383:1: warning: embedding a directive within macro arguments is not portable [enabled by default]
hwclock.c:1385:1: warning: embedding a directive within macro arguments is not portable [enabled by default]
cmos.c: In function 'outb':
cmos.c:84:15: warning: unused parameter 'a' [-Wunused-parameter]
cmos.c:84:22: warning: unused parameter 'b' [-Wunused-parameter]
cmos.c: In function 'inb':
cmos.c:88:13: warning: unused parameter 'c' [-Wunused-parameter]
cmos.c: In function 'atomic':
cmos.c:265:20: warning: unused parameter 'name' [-Wunused-parameter]
cmos.c: In function 'i386_iopl':
cmos.c:544:32: warning: unused parameter 'level' [-Wunused-parameter]
cmos.c: In function 'get_permissions_cmos':
cmos.c:565:8: warning: unused variable 'errsv' [-Wunused-variable]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
In addition numeric exit values are converted to defined strings.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
One deletion, few adds and sort to include lists.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Despide amount of the change this change should be harmless.
Everything is about indendation, comment restructuring etc not
code changes.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
There is no need to keep this file hanging around anymore.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
[kzak@redhat.com: - check for obsolete asm/io.h in configure.ac]
Signed-off-by: Josiah Worcester <josiahw@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
hwclock.c: In function ‘set_hardware_clock’:
hwclock.c:467:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
hwclock.c: In function ‘main’:
hwclock.c:1461:7: warning: variable ‘ARCconsole’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Thanks to the direct ISA method and by disabling the RTC get/set epoch
functionality, hwclock can work fine on non-Linux systems which provide
ioperm or iopl.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If /etc/adjtime doesn't specify UTC or LOCAL, rtcwake defaults to UTC
and hwclock defaults to LOCAL.
Switch hwclock to meet the behaviour of rtcwake (default=UTC), also
matching the kernel's CONFIG_RTC_HCTOSYS behaviour.
The user impact of this change should be minimal, as anyone who has run
"hwclock --systohc" before will have their UTC/LOCAL choice already
recorded in /etc/adjtime.
Signed-off-by: Daniel Drake <dsd@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases the date/time stored in an RTC can be corrupted, eg due to
loss of power, before its been initially set, etc. When this occurs
the RTC_RD_TIME ioctl can fail since the Linux kernel determines that
the RTC contains invalid data. Currently, when setting an RTC using
hwclock, hwclock performs a number of RTC_RD_TIME ioctls before setting
the RTC. When one of these ioctls fails, hwclock bombs out and the
corrupted RTC data can't be overwritten. Thus once an RTC is corrupted,
it can't be fixed via hwclock*.
To work around the above issue we can make hwclock not exit when a
RTC_RD_TIME failure occurs during the process of setting the RTC. This
allows the RTC to be set even when it contains an invalid value,
although it is not synchronized to a clock tick before it is set.
* 'hwclock --utc --noadjfile --set --date="11/23/10 17:19:00' currently
works to fix a corrupted RTC, but a user couldn't determine this without
digging through the source code.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old KDGHWCLK ioctl was removed from the Linux kernel quite some
time ago. The kd.c source file of hwclock contains fallback code to
handle this, but the fallback code never could have compiled or was
not fixed along other code changes. The Linux kernel nowadays igno-
res the ioctl entirely so removing it unless provided by the kernel
headers, to keep it working on very old kernels, seems the sensible
thing to do, as the comments say m68k only and deprecated (which is
correct AFAICT).
According to pickaxe on gitweb, it was removed in 2002:
http://git.kernel.org/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=a915e414af5fc541ff62ef0bfec847457ae650bc
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578168
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Implement new option --predict that predicts what the RTC will read
at a time given by the --date option. This is useful for example if
you need to setup an RTC wakeup time to distant future and want to
account for the RTC drift.
Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Even though --systz doesn't need to change the system clock when the
hardware clock is in UTC time (--systz --utc), it does need to set
the kernel timezone so that FAT timestamps, etc. will be correct.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
|
|
|
|
|
|
|
|
| |
When using --systz we do not read from the hardware clock, so there
is no need to search for a hardware clock. Indeed, we may be running
hwclock --systz before /dev is mounted.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
|
|
|
|
|
|
| |
Those became unused with the switch to the blkdev functions.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
|
|
|
|
|
|
|
| |
This function is marked obsolete in POSIX.1-2001 and removed in
POSIX.1-2008.
Conditionally replaced with nanosleep().
Signed-off-by: Daniel Mierswa <impulze@impulze.org>
|
|
|
|
|
|
|
|
| |
Currently the busy wait in synchronize_to_clock_tick_kd() is
restricted by number of loops. It's better to use time limit
(1.5s). We already use this method for RTC.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
|
|
|
|
|
| |
date_child_fp is opened by popen, so should be closed with pclose.
Signed-off-by: John Keeping <john.keeping@lineone.net>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the system clock time is already set from the hardware clock by the
kernel (when compiled with CONFIG_RTC_HCTOSYS), there's no particular need to
read the hardware clock again.
This option sets the system clock using itself as a reference if the
hardware clock was in local time. The resulting system clock time
is in UTC, with the kernel timezone set to the difference.
[kzak@redhat.com: - fix the condition that controls read_adjtime() call]
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The protection against context switch is nonsense. There is possible
to optimize the access to CMOS by mlockall(MCL_CURRENT) and SCHED_FIFO.
For more details see: http://lkml.org/lkml/2008/10/12/132
Reported-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
We shouldn't ignore RTC_RD_TIME/RTCGET error codes.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid delaying 1.5 seconds when 0.5 will do.
- Guard for forward time resets as well.
[kzak@redhat.com: - fix the "Delaying.." debug message
- add comments]
Signed-off-by: Kalev Soikonen <ksop@hot.ee>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* It seems that
rtc-isl1208 0-006f: chip found, driver version 0.3
rtc-isl1208 0-006f: rtc core: registered rtc-isl1208 as rtc0
rtc-isl1208 0-006f: rtc power failure detected, please set clock.
causes that hardware clock returns persistent time and synchronization
is impossible. The hwclock(8) has to ignore this problem and allows to
set clock anyway.
* synchronize_to_clock_tick() shouldn't to print the "...got clock tick"
debug message in case of failure.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
I was puzzled why "hwclock" wrongly reported my x86_64 sytem didn't
support RTC update interrupts. Bogus #ifdef, that's why ... added
by the 2.11y patch (from 2.11t). Probably this whole #ifdef should
just vanish ... if the kernel rejects UIE_ON, the program ought to
just cope with it.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
- Bogus if test means one message is never produced.
- Avoid needless passing of a global variable (debug).
The --test option flag ought to be a global as well (and perhaps -n/--dry-run).
Signed-off-by: Kalev Soikonen <ksop@hot.ee>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Old version:
# hwclock --systohc --noadjfile --utc --debug
hwclock from util-linux-ng 2.14
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc does not have interrupt functions. Waiting in loop for time
from /dev/rtc to change
...got clock tick
Time read from Hardware Clock: 2008/06/17 11:18:24
Hw clock time : 2008/06/17 11:18:24 = 1213701504 seconds since 1969
Time elapsed since reference time has been 0.904855 seconds.
Delaying further to reach the next full second.
Setting Hardware Clock to 11:18:24 = 1213701504 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
New version:
# hwclock --systohc --noadjfile --utc --debug
hwclock from util-linux-ng 2.14
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Time elapsed since reference time has been 0.572151 seconds.
Delaying further to reach the next full second.
Setting Hardware Clock to 11:18:52 = 1213701532 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
Addresses-Debian-Bug: #478663
Signed-off-by: Karel Zak <kzak@redhat.com>
|