Commit graph

56 commits

Author SHA1 Message Date
Michael Kerrisk (man-pages)
4f68c8b179 Manual pages: various: reword "allow(s) to"
The wording "allow(s) to" is not grammatical English. Reword various
pages to use a more correct form such "can be use to" or "allows
the [noun] of".

Aklong the way, fix a few nearby wording errors in some pages.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-07-14 14:08:54 +02:00
Bjarni Ingi Gislason
db850f3c19 Subject: docs: remove unnecessary paragraph macros
Remove a second paragraph macro (.TP, .PP) as it does not change the
output (.SS/.PP) or it adds an extra empty line (.TP/.TP)

  Warning from "mandoc -Tlint":

mandoc: ./sys-utils/hwclock.8.in:299:2: WARNING: line scope broken: TP breaks TP
mandoc: ./sys-utils/hwclock.8.in:459:2: WARNING: skipping paragraph macro: PP after SS
mandoc: ./sys-utils/hwclock.8.in:543:2: WARNING: skipping paragraph macro: PP after SS
mandoc: ./sys-utils/hwclock.8.in:574:2: WARNING: skipping paragraph macro: PP after SS
mandoc: ./sys-utils/hwclock.8.in:673:2: WARNING: skipping paragraph macro: PP after SS
mandoc: ./sys-utils/hwclock.8.in:721:2: WARNING: skipping paragraph macro: PP after SS

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2020-07-14 10:37:49 +02:00
Pierre Labastie
90084a2608 docs: Fix adjtime documentation
The first line of the adjtime file is made of three numbers (see=20
hwclock.c):
	- a drift factor as a decimal float
	- the time of last adjust as a decimal integer
	- a zero (for compatibility) as a decimal float.

but both man pages (hwclock.8 and adj_time.5) tell that the third
number is a decimal integer.

Of course this is harmless if somebody edits the adjtime file with
"0"=20 as the third number: it will be correctly read by hwclock
anyway.  But if for some reason, a program reads the adjtime file and
expects an integer, it will fail, because hwclock writes O.OOOO0O as
the third=20 number.

Signed-off-by:: Pierre Labastie <pierre.labastie@neuf.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-12-06 12:50:46 +01:00
Sami Kerola
dbeb1d733e
docs: try to find broken man references and fix them
Unfortunately methods I used to find and fix were based on quite manual
process that cannot be easily repeated so I do not see how this fix could be
turned into a tools/checkmans.sh addition.  Well, lets hope doing this
manually twice every decade is good enough.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2019-08-26 19:43:40 +01:00
Bjarni Ingi Gislason
559ee54af1 man pages: Fix misuse of two-fonts-macros (BR, IR)
Change a two-fonts-macro to the single font one, when there is only
one genuine argument.

  Split a punctuation mark from the only argument to a two-fonts-marco.

  Remove an isolated two-fonts-macro.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2018-08-06 08:58:57 +02:00
Karel Zak
6df5c6d4e0 hwclock: remove ntpd from man page
It seems better to use generic "NTP daemon" in the man page than
points to specific ntpd(1) implementation as some distros use for
example chronyd(1) rather than old ntpd(1).

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-07-31 11:07:47 +02:00
Karel Zak
df4f1a6647 hwclock: add --delay <seconds>
* add command line option --delay <seconds>

* read RTC type from /sys/class/rtc/rtc<N>/name

* default to 0.5 (500ms) for rtc_cmos or when RTC type is impossible
  determine; otherwise delay is 0.

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-07-18 13:59:15 +02:00
J William Piggott
de4568f757 hwclock: rename --debug option to --verbose
Warn on --debug; do not fallthrough because
the message is lost in the verbose output.

Coauthored-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2018-01-17 13:29:11 +01:00
J William Piggott
f0a0ce7445 hwclock: make debug implicit for test mode.
Calling --test without --debug is not useful, so
make it implicit.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-09-21 14:53:43 -04:00
Sami Kerola
40191b5f95 hwclock: add -a that is short of --adjust to manual page and usage
In same go use -V as return value of --version from getopts_long().

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-05 14:34:53 +02:00
J William Piggott
c47a8f2a87 hwclock: remove sysexits.h
sysexits.h was introduced in v2.11t prior to util-linux-ng, with the
HISTORY entry: * hwclock: minor polishing.

So there was no specific issue solved by adding it. Its use was never
documented so it should be safe to remove.

Also, fix return values being used for the exit status that were not
magic constants (portability issue).

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-09-03 12:03:10 -04:00
J William Piggott
fefc39f965 hwclock: update man page
Add information about setting the Hardware Clock if it has been
corrupted.

Add information about --update-drift and reduced system shutdown
times for --systohc.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-08-04 08:53:44 -04:00
J William Piggott
80cd80172e hwclock: remove m68k and alpha cmos from manual
m68k removed in commit 846c7d3
  alpha cmos removed in commit c47a618

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-07-31 13:48:04 +02:00
J William Piggott
f7599b4f86 hwclock: --epoch presence test fails
hwclock --setepoch --epoch 0
Will warn that the epoch option is required.

The --epoch presence test is made on its argument after it is
converted to an integer. This means any value it can be tested
for, can also be given as an input.

So make the conversion after the presence test, like the
--date option does.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-07-16 08:41:54 -04:00
J William Piggott
2b1aa08734 hwclock: sync one-liner descriptions
Make whatisdb/manpage and usage() one-line descriptions match.

Also update the description; hwclock has evolved into much more
than reading and setting the Hardware Clock. It also sets the
System Clock, warps the System Clock, sets the kernel time
configurations, and more.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-07-10 16:05:24 -04:00
J William Piggott
891b43432f hwclock: add --update-drift check
Only allow --update-drift for --set or --systohc

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-06-20 19:56:39 -04:00
Rasmus Villemoes
3752694299 hwclock: allow -l as alias for --localtime
For symmetry with --utc where a short form is already allowed, and to
make it easier to write scripts that will work with both util-linux'
and busybox' hwclock, make -l another spelling of
--localtime. (Busybox also understands --localtime, but only if it has
been compiled with long option support.)
2017-05-31 20:25:16 +02:00
J William Piggott
697bfcf576 hwclock: remove residual 'compare' from man-page
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-04-10 14:57:01 -04:00
J William Piggott
c47a61894b hwclock: remove alpha cmos
Remove alpha direct I/O access, use RTC instead:
http://marc.info/?l=util-linux-ng&m=141682406902804

Resolves the alpha 2020 issue for util-linux:
http://marc.info/?l=util-linux-ng&m=148387021519787

Now it is only the kernel's RTC problem.

* sys-utils/hwclock.c: remove alpha cmos
* sys-utils/hwclock-cmos.c: same
* sys-utils/hwclock.h: same
* sys-utils/hwclock.8.in: same

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-03-31 10:04:53 -04:00
J William Piggott
f6374e1fb3 hwclock: remove 1994 Award BIOS workaround
Remove the 1994 Award BIOS bug workaround as
previously discussed more than two years ago:
http://marc.info/?l=util-linux-ng&m=141682406902804&w=2

* sys-utils/hwclock.c: remove badyear option
* sys-utils/hwclock.h: same
* sys-utils/hwclock.8.in: same

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-03-31 12:56:03 +02:00
J William Piggott
1811900a91 hwclock-rtc.c: try the 'new' rtc class first
* sys-utils/hwclock-rtc.c: try to open the 'new' rtc class driver first.
* sys-utils/hwclock.8.in: document this.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-03-23 16:14:01 -04:00
J William Piggott
b80d6d4be8 lib: add parse-date documentation
* Documentation/parse-date.txt - new file
* sys-utils/hwclock.8.in
	Fix the --date option description.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-03-04 15:03:44 -05:00
Sami Kerola
92931ab28d
hwclock: remove --compare option
Compare functionality was printing nonsense values.  There is no knowledge
of anyone using this broken functionality.  Instead of deprecating the code
for months, and removing it after few release, it is removed immediately.
Needless to say this is unusual removal.

Reference: http://marc.info/?l=util-linux-ng&m=148396210506652&w=2
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-02-04 23:39:38 +00:00
Sébastien Helleu
d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
J William Piggott
e05ac5aae0 hwclock.c, hwclock.8.in: new --show format
* hwclock.c: change --get and --show functions to the ISO 8601
  format and concatenate fractional seconds to the time display.

* hwclock.8.in: document this.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2016-02-16 19:37:32 -05:00
Anna Jonna Ármannsdóttir
dadaad0187 Change of output format and documentation. 2016-01-28 19:03:20 +00:00
Karel Zak
46e43c9860 hwclock: add -D to the man page
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1244609
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-07-20 10:10:05 +02:00
Karel Zak
687cc5d589 hwclock: don't allow non-root access
Fortunately very few people are crazy enough to install hwclock as
setuid. Some comments in code and unfortunately also man page
advertising that setuid is no problem. That's pretty stupid promise.

The code quality is poor and it's obviously not designed to be secure
(things like popen() without drop privileges, etc.).

This patch removes all notes about "setuid support" and for sure
disable hwclock execution for non-root users.

Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786804
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-05-26 10:32:38 +02:00
Benno Schulenberg
dffd1f3f57 hwclock: fix spelling, punctuation and formatting mistakes in the man page
Also improve some wordings.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-04-28 12:40:41 +02:00
Karel Zak
a6e5a415bd hwclock: clean up man page header
We already use .TQ in another man pages for years and nobody
complains, so I guess the fallback is unnecessary.

The patch also minimize in-header change-log. We have git for this
purpose.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-28 12:27:18 +02:00
Benno Schulenberg
0f9a4b029f hwclock: remove an untrue phrase from the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-04-28 12:19:07 +02:00
Karel Zak
8979e7024e hwclock: cosmetic changes to man page
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 10:55:46 +01:00
J William Piggott
963a702ef5 hwclock: man-page errata
The information I wrote regarding clock crystals was not
only incomplete, it was wrong. The characteristics of
quartz crystals is beyond the scope of this man-page. It
was misguided to attempt to include it. This commit
removes said information.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-13 14:40:59 -04:00
J William Piggott
d0c7dfdf33 hwclock: add '11 minute mode' information
Add that '11 minute mode' is a kernel compile time
option. Add details regarding its activation and
how to check its status.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-13 14:37:22 -04:00
J William Piggott
187c2b8e4d hwclock: remove depreciated ntpdate
Replace references to the depreciated ntpdate with sntp.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-13 14:35:22 -04:00
J William Piggott
073971e906 hwclock: Improve FILES section
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-13 14:34:08 -04:00
J William Piggott
ea6b197e60 hwclock: add TZDIR
Add information about TZDIR and improve the
ENVIRONMENT section.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-13 14:31:50 -04:00
Bill Pemberton
a55f60a107 docs: fix some spelling errors and typos in man pages
runuser.1: fix spelling implemenation -> implementation
scriptreplay.1: fix spelling overide -> override
unshare.1: fix spelling permamently -> permanently
last.1: fix spelling preferrable -> preferable
lslogins.1: fix spelling priviliges -> privileges
hwclock.8.in: fix spelling transfered -> transferred
prlimit.1: fix typo umlimited -> unlimited
agetty.8: fix typo unnsupported -> unsupported

Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
2015-02-27 14:48:56 +01:00
J William Piggott
440afddb1c hwclock: improve man-page language
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-02-19 10:54:02 +01:00
J William Piggott
440b529693 hwclock: man-page errata
Professor Eggert, maintainer of the tz database, reviewed
the new POSIX vs 'RIGHT' man-page section and suggested
the following corrections.

Correct the subdirectory names and remove IANA from the
name of the Time Zone Database.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-02-16 11:08:24 +01:00
J William Piggott
3400dbba7c hwclock: add checking kernel vars to man-page
How to check kernel clock variables with either
adjtimex or ntptime added to man-page.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-02-08 16:44:26 -05:00
J William Piggott
37f8d848af hwclock: Add ntptime reference to man-page
Some distros do not have an adjtimex package;
ntptime can be used as an alternate.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-02-07 20:44:02 -05:00
J William Piggott
1afe0412e0 hwclock: update man-page for directisa change
Update man-page for the direct ISA options
changes.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-13 20:31:47 -05:00
JWP
d1bfa4ef53 hwclock: man regression
Fixes merge for commit 2ed1d70 that clobbered commit 98ac774

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-12 12:36:23 +01:00
JWP
cb15645bd3 hwclock: man page 'Since v2.26' notes
Clean up the 'Since v2.26' man page notes.
They were redundant of information already
in the manual, and became too verbose.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-09 10:50:26 +01:00
JWP
2ed1d70160 hwclock: update man page for v2.26 rc
Authored new section: DATE-TIME CONFIGURATION.
Subsections: Keeping Time..., LOCAL vs UTC, POSIX vs 'RIGHT'.
Errata and drop outdated language.
Updates for v2.26

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-09 10:50:26 +01:00
Sami Kerola
98ac77456e docs: make tools/checkmans.sh to pass without warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-01-07 21:57:53 +00:00
Benno Schulenberg
df48a72161 hwclock: improve wording and formatting of man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-11-13 15:09:16 +01:00
J William Piggott
5cb71d2bca hwclock: adjust wording of v2.26 notes
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2014-10-20 14:07:27 -04:00
Karel Zak
732ac3a52a hwclock: add notes about default behavior changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-20 14:01:25 +02:00