yppoll(8): Comment out -h option.

The implementation of it is missing (see e.g. NetBSD or OpenBSD). Until
someone works on it, comment out the existing code to silence a warning
about 'hostname' being set but unused.

Found-by: gcc47

Submitted by:	Sascha Wildner <swildner@dragonflybsd.org>
Obtained from:	DragonFlyBSD (commit e455855db)
This commit is contained in:
Craig Rodrigues 2015-05-31 20:20:24 +00:00
parent eddb85c663
commit 4a2ec8401f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283837
2 changed files with 21 additions and 11 deletions

View File

@ -27,7 +27,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd October 25, 1994 .Dd May 31, 2015
.Dt YPPOLL 8 .Dt YPPOLL 8
.Os .Os
.Sh NAME .Sh NAME
@ -35,7 +35,7 @@
.Nd ask version of YP map from YP server .Nd ask version of YP map from YP server
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl h Ar host .\".Op Fl h Ar host
.Op Fl d Ar domain .Op Fl d Ar domain
.Ar mapname .Ar mapname
.Sh DESCRIPTION .Sh DESCRIPTION
@ -48,15 +48,15 @@ server for
.Pp .Pp
The options are as follows: The options are as follows:
.Bl -tag -width indent .Bl -tag -width indent
.It Fl h Ar host .\".It Fl h Ar host
Ask the YP server process running on .\"Ask the YP server process running on
.Ar host .\".Ar host
for information about .\"for information about
.Ar mapname . .\".Ar mapname .
If .\"If
.Ar host .\".Ar host
is not specified, the server polled is the default server returned by .\"is not specified, the server polled is the default server returned by
.Xr ypwhich 1 . .\".Xr ypwhich 1 .
.It Fl d Ar domain .It Fl d Ar domain
Use the YP domain Use the YP domain
.Ar domain .Ar domain

View File

@ -49,7 +49,11 @@ __FBSDID("$FreeBSD$");
static void static void
usage(void) usage(void)
{ {
#if 0
fprintf(stderr, "usage: yppoll [-h host] [-d domainname] mapname\n"); fprintf(stderr, "usage: yppoll [-h host] [-d domainname] mapname\n");
#else
fprintf(stderr, "usage: yppoll [-d domainname] mapname\n");
#endif
exit(1); exit(1);
} }
@ -57,7 +61,9 @@ int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
char *domainname; char *domainname;
#if 0
char *hostname = "localhost"; char *hostname = "localhost";
#endif
char *inmap, *master; char *inmap, *master;
int order; int order;
int c, r; int c, r;
@ -71,7 +77,11 @@ main(int argc, char *argv[])
domainname = optarg; domainname = optarg;
break; break;
case 'h': case 'h':
#if 0
hostname = optarg; hostname = optarg;
#else
/* does nothing */
#endif
break; break;
case '?': case '?':
usage(); usage();