diff options
author | Karel Zak | 2008-08-06 13:19:40 +0200 |
---|---|---|
committer | Karel Zak | 2008-08-06 13:19:40 +0200 |
commit | 28e984a41990ffd3d8b8ecf6520d2debad95ee51 (patch) | |
tree | 24d03c5c721a9cf1ecc7bb55c074322a58b8e0c8 /hwclock | |
parent | hwclock: unshadow a diagnostic printf (diff) | |
download | kernel-qcow2-util-linux-28e984a41990ffd3d8b8ecf6520d2debad95ee51.tar.gz kernel-qcow2-util-linux-28e984a41990ffd3d8b8ecf6520d2debad95ee51.tar.xz kernel-qcow2-util-linux-28e984a41990ffd3d8b8ecf6520d2debad95ee51.zip |
hwclock: cleanup help output and man page
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'hwclock')
-rw-r--r-- | hwclock/hwclock.8 | 49 | ||||
-rw-r--r-- | hwclock/hwclock.c | 58 |
2 files changed, 42 insertions, 65 deletions
diff --git a/hwclock/hwclock.8 b/hwclock/hwclock.8 index 5a741f3c8..31eda21f3 100644 --- a/hwclock/hwclock.8 +++ b/hwclock/hwclock.8 @@ -1,37 +1,8 @@ -.TH HWCLOCK 8 "02 March 1998" +.TH HWCLOCK 8 "06 August 2008" .SH NAME hwclock \- query and set the hardware clock (RTC) .SH SYNOPSIS -.BR "hwclock \-r" " or " "hwclock \-\-show" -.br -.BR "hwclock \-w" " or " "hwclock \-\-systohc" -.br -.BR "hwclock \-s" " or " "hwclock \-\-hctosys" -.br -.BR "hwclock \-a" " or " "hwclock \-\-adjust" -.br -.BR "hwclock \-v" " or " "hwclock \-\-version" -.br -.B "hwclock \-\-set \-\-date=newdate" -.br -.B "hwclock \-\-getepoch" -.br -.B "hwclock \-\-setepoch \-\-epoch=year" -.PP -other options: -.PP -.B "[\-u|\-\-utc] \-\-localtime \-\-noadjfile \-\-directisa" -.B "\-\-test [\-D|\-\-debug]" -.B "\-\-rtc=filename" -.B "\-\-adjfile=filename" -.PP -and arcane options for DEC Alpha: -.PP -.B "[\-A|\-\-arc] [\-J|\-\-jensen] [\-S|\-\-srm] [\-F|\-\-funky-toy]" -.PP -Minimum unique abbreviations of all options are acceptable. -.PP -Also, \-h asks for a help message. +.BR "hwclock [functions] [options]" .SH DESCRIPTION .B hwclock @@ -46,13 +17,13 @@ periodically to insert or remove time from the Hardware Clock to compensate for systematic drift (where the clock consistently gains or loses time at a certain rate if left to run). -.SH OPTIONS +.SH FUNCTIONS You need exactly one of the following options to tell .B hwclock what function to perform: .PP .TP -.B \-\-show +.B \-r, \-\-show Read the Hardware Clock and print the time on Standard Output. The time shown is always in local time, even if you keep your Hardware Clock in Coordinated Universal Time. See the @@ -65,7 +36,7 @@ Set the Hardware Clock to the time given by the .B \-\-date option. .TP -.B \-\-hctosys +.B \-s, \-\-hctosys Set the System Time from the Hardware Clock. Also set the kernel's timezone value to the local timezone @@ -80,7 +51,7 @@ to DST_NONE. (For details on what this field used to mean, see This is a good option to use in one of the system startup scripts. .TP -.B \-\-systohc +.B \-w, \-\-systohc Set the Hardware Clock to the current System Time. .TP .B \-\-adjust @@ -105,7 +76,7 @@ option. See the .B \-\-getepoch option for details. .TP -.B \-\-version +.B \-v, \-\-version Print the version of .B hwclock on Standard Output. @@ -140,10 +111,12 @@ For example, on a Digital Unix machine: .sp .I hwclock --setepoch --epoch=1952 + +.SH OPTIONS .PP The following options apply to most functions. .TP -.B \-\-utc +.B \-u, \-\-utc .TP .B \-\-localtime Indicates that the Hardware Clock is kept in Coordinated Universal @@ -188,7 +161,7 @@ must be specified when using this option. overrides the default /etc/adjtime. .TP -.B \-\-rtc=filename +.B \-f, \-\-rtc=filename overrides the default /dev file name, which is .IR /dev/rtc on many platforms but may be diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c index 619ff79f6..12e7676bb 100644 --- a/hwclock/hwclock.c +++ b/hwclock/hwclock.c @@ -1218,39 +1218,43 @@ usage( const char *fmt, ... ) { "hwclock - query and set the hardware clock (RTC)\n\n" "Usage: hwclock [function] [options...]\n\n" "Functions:\n" - " --help show this help\n" - " --show read hardware clock and print result\n" - " --set set the rtc to the time given with --date\n" - " --hctosys set the system time from the hardware clock\n" - " --systohc set the hardware clock to the current system time\n" - " --adjust adjust the rtc to account for systematic drift since \n" - " the clock was last set or adjusted\n" - " --getepoch print out the kernel's hardware clock epoch value\n" - " --setepoch set the kernel's hardware clock epoch value to the \n" - " value given with --epoch\n" - " --version print out the version of hwclock to stdout\n" - "\nOptions: \n" - " --utc the hardware clock is kept in coordinated universal time\n" - " --localtime the hardware clock is kept in local time\n" - " --rtc=path special /dev/... file to use instead of default\n" - " --directisa access the ISA bus directly instead of %s\n" - " --badyear ignore rtc's year because the bios is broken\n" - " --date specifies the time to which to set the hardware clock\n" - " --epoch=year specifies the year which is the beginning of the \n" - " hardware clock's epoch value\n" - " --noadjfile do not access /etc/adjtime. Requires the use of\n" - " either --utc or --localtime\n" - " --adjfile=path specifies the path to the adjust file (default is\n" - " /etc/adjtime)\n" + " -h | --help show this help\n" + " -r | --show read hardware clock and print result\n" + " --set set the rtc to the time given with --date\n" + " -s | --hctosys set the system time from the hardware clock\n" + " -w | --systohc set the hardware clock to the current system time\n" + " --adjust adjust the rtc to account for systematic drift since\n" + " the clock was last set or adjusted\n" + " --getepoch print out the kernel's hardware clock epoch value\n" + " --setepoch set the kernel's hardware clock epoch value to the \n" + " value given with --epoch\n" + " -v | --version print out the version of hwclock to stdout\n" + "\nOptions: \n" + " -u | --utc the hardware clock is kept in UTC\n" + " --localtime the hardware clock is kept in local time\n" + " -f | --rtc=path special /dev/... file to use instead of default\n" + " --directisa access the ISA bus directly instead of %s\n" + " --badyear ignore rtc's year because the bios is broken\n" + " --date specifies the time to which to set the hardware clock\n" + " --epoch=year specifies the year which is the beginning of the \n" + " hardware clock's epoch value\n" + " --noadjfile do not access /etc/adjtime. Requires the use of\n" + " either --utc or --localtime\n" + " --adjfile=path specifies the path to the adjust file (default is\n" + " /etc/adjtime)\n" + " --test do everything except actually updating the hardware\n" + " clock or anything else\n" + " -D | --debug debug mode\n" + "\n" ),RTC_DEV); #ifdef __alpha__ fprintf(usageto, _( - " --jensen, --arc, --srm, --funky-toy\n" - " tell hwclock the type of alpha you have (see hwclock(8))\n" + " -J|--jensen, -A|--arc, -S|--srm, -F|--funky-toy\n" + " tell hwclock the type of alpha you have (see hwclock(8))\n" + "\n" ) ); #endif - fflush(stdout); if (fmt) { usageto = stderr; |