- add missing options and arguments to program's usage()

and sync it with manpage's SYNOPSIS

- generally clean up a manpage's formatting

Reviewed by:	edwin
This commit is contained in:
Ruslan Ermilov 2011-05-20 17:35:10 +00:00
parent 59d7277f4a
commit 81046d3cb3
2 changed files with 29 additions and 23 deletions

View File

@ -23,7 +23,8 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.Dd July 4, 2009
.\"
.Dd October 21, 2009
.Dt TZSETUP 8
.Os
.Sh NAME
@ -32,8 +33,8 @@
.Sh SYNOPSIS
.Nm
.Op Fl nrs
.Op Fl C Ar chroot directory
.Op Ar zoneinfo file | zoneinfo name
.Op Fl C Ar chroot_directory
.Op Ar zoneinfo_file | zoneinfo_name
.Sh DESCRIPTION
The
.Nm
@ -50,24 +51,25 @@ the hardware clock does not keep
.Pp
The following option is available:
.Bl -tag -offset indent -width Fl
.It Fl C Ar chroot directory
.It Fl C Ar chroot_directory
Open all files and directories relative to
.Ar chroot directory .
.Ar chroot_directory .
.It Fl n
Do not create or copy files.
.It Fl r
Reinstall the zoneinfo file installed last time. The name is obtained from
Reinstall the zoneinfo file installed last time.
The name is obtained from
.Pa /var/db/zoneinfo .
.It Fl s
.It Fl s
Skip the initial question about adjusting the clock if not set to
.Tn UTC .
.El
.Pp
It is possible to short-circuit the menu system by specifying the
location of a
.Ar zoneinfo file
.Ar zoneinfo_file
or the name of the
.Ar zoneinfo name
.Ar zoneinfo_name
on the command line; this is intended mainly for pre-configured installation
scripts or people who know which zoneinfo they want to install.
.Sh TIMEZONE DATABASE
@ -101,38 +103,41 @@ The source code to the database
contains many additional comments and documentation references for the
historically minded.
.Sh FILES
.Bl -tag -width /usr/share/zoneinfo/zone.tab -compact
.Bl -tag -width ".Pa /usr/share/zoneinfo/zone.tab" -compact
.It Pa /etc/localtime
current time zone file.
current time zone file
.It Pa /etc/wall_cmos_clock
see
.Xr adjkerntz 8 .
.Xr adjkerntz 8
.It Pa /usr/share/misc/iso3166
mapping of
.Tn ISO
3166 territory codes to names.
3166 territory codes to names
.It Pa /usr/share/zoneinfo
directory for zoneinfo files.
directory for zoneinfo files
.It Pa /usr/share/zoneinfo/zone.tab
mapping of timezone file to country and location.
mapping of timezone file to country and location
.It Pa /var/db/zoneinfo
saved name of the timezone file installed last.
saved name of the timezone file installed last
.El
.Sh EXAMPLES
Normal usage, to select the right zoneinfo file via the dialog-based
user interface:
.Dl # tzsetup
.Dl tzsetup
.Pp
Install the file
.Pa /usr/share/zoneinfo/Australia/Sydney :
.Dl # tzsetup /usr/share/zoneinfo/Australia/Sydney
.Dl "tzsetup /usr/share/zoneinfo/Australia/Sydney"
.Pp
Install the zoneinfo file for Australia/Sydney, assumed to be located
in
.Pa /usr/share/zoneinfo :
.Dl # tzsetup Australia/Sydney
.Dl "tzsetup Australia/Sydney"
.Pp
After a reinstall of the zoneinfo files, you can reinstall the
latest installed zoneinfo file: (as specified in
.Pa /var/db/zoneinfo )
.Dl # tzsetup -r
latest installed zoneinfo file (as specified in
.Pa /var/db/zoneinfo ) :
.Dl "tzsetup -r"
.Sh SEE ALSO
.Xr date 1 ,
.Xr adjtime 2 ,

View File

@ -731,7 +731,8 @@ static void
usage(void)
{
fprintf(stderr, "usage: tzsetup [-nrs] [zoneinfo file]\n");
fprintf(stderr, "usage: tzsetup [-nrs] [-C chroot_directory]"
" [zoneinfo_file | zoneinfo_name]\n");
exit(1);
}