diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-04-02 15:34:40 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-04-02 15:34:40 +0000 |
commit | 927963a2e373448f597a0805592a0682a470b79c (patch) | |
tree | b55a55dd331a7d76fe1b512877f3d84fb0db7ba8 /usr.bin/ypwhich | |
parent | 0d552d534303565022381e633b88f72e0d2794e5 (diff) |
tidy up synopsis and usage();
includes bits of a diff from Igor Sobrado and some help from otto
ok otto
Diffstat (limited to 'usr.bin/ypwhich')
-rw-r--r-- | usr.bin/ypwhich/ypwhich.1 | 28 | ||||
-rw-r--r-- | usr.bin/ypwhich/ypwhich.c | 9 |
2 files changed, 20 insertions, 17 deletions
diff --git a/usr.bin/ypwhich/ypwhich.1 b/usr.bin/ypwhich/ypwhich.1 index daa6a2e3103..2251d72eef1 100644 --- a/usr.bin/ypwhich/ypwhich.1 +++ b/usr.bin/ypwhich/ypwhich.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ypwhich.1,v 1.13 2007/03/29 11:03:54 jmc Exp $ +.\" $OpenBSD: ypwhich.1,v 1.14 2007/04/02 15:34:39 jmc Exp $ .\" $NetBSD: ypwhich.1,v 1.3 1996/05/13 02:43:46 thorpej Exp $ .\" .\" Copyright (c) 1994 Christopher G. Demetriou @@ -29,7 +29,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: ypwhich.1,v 1.13 2007/03/29 11:03:54 jmc Exp $ +.\" $Id: ypwhich.1,v 1.14 2007/04/02 15:34:39 jmc Exp $ .\" .Dd February 23, 1994 .Dt YPWHICH 1 @@ -39,15 +39,18 @@ .Nd return hostname of YP server or map master .Sh SYNOPSIS .Nm ypwhich +.Op Fl t .Op Fl d Ar domain .Oo -.Op Fl h Ar host -.Op Fl t -.Fl m Op Ar mname -| +.Op Fl h .Ar host .Oc .Nm ypwhich +.Op Fl t +.Op Fl d Ar domain +.Op Fl h Ar host +.Fl m Op Ar mname +.Nm ypwhich .Fl x .Sh DESCRIPTION .Nm @@ -71,19 +74,18 @@ The options are as follows: .It Fl d Ar domain Specify a domain other than the default domain. .It Fl h Ar host -Specify which host to ask when -.Fl m -is given. +Specify which host to query. .It Fl m Op Ar mname Find the master .Tn YP server for the named map. -No +The .Ar host -may be specified with the -.Fl m +to query, if non-default, +must be specified using the +.Fl h option. -.Ar Mname +.Ar mname can be a map name or nickname. If .Ar mname diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c index d4fa8e7cc45..683b2bc5435 100644 --- a/usr.bin/ypwhich/ypwhich.c +++ b/usr.bin/ypwhich/ypwhich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypwhich.c,v 1.18 2006/04/02 23:37:21 deraadt Exp $ */ +/* $OpenBSD: ypwhich.c,v 1.19 2007/04/02 15:34:39 jmc Exp $ */ /* $NetBSD: ypwhich.c,v 1.6 1996/05/13 02:43:48 thorpej Exp $ */ /* @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ypwhich.c,v 1.18 2006/04/02 23:37:21 deraadt Exp $"; +static char rcsid[] = "$Id: ypwhich.c,v 1.19 2007/04/02 15:34:39 jmc Exp $"; #endif #include <sys/param.h> @@ -72,8 +72,9 @@ static void usage(void) { fprintf(stderr, - "usage: ypwhich [-d domain] [[-h host] [-t] -m [mname] | host]\n"); - fprintf(stderr, " ypwhich -x\n"); + "usage: ypwhich [-t] [-d domain] [[-h] host]\n" + " ypwhich [-t] [-d domain] [-h host] -m [mname]\n" + " ypwhich -x\n"); exit(1); } |