Style(9) fixes, thanks to Ruslan.

This commit is contained in:
Tim Kientzle 2006-12-08 07:47:08 +00:00
parent 8d3027e203
commit 8abbcd2910
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165006
2 changed files with 8 additions and 7 deletions

View File

@ -37,8 +37,7 @@
.Nd set or print name of current host system .Nd set or print name of current host system
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl f .Op Fl fs
.Op Fl s
.Op Ar name-of-host .Op Ar name-of-host
.Sh DESCRIPTION .Sh DESCRIPTION
The The

View File

@ -58,12 +58,14 @@ main(int argc, char *argv[])
char *p, hostname[MAXHOSTNAMELEN]; char *p, hostname[MAXHOSTNAMELEN];
sflag = 0; sflag = 0;
while ((ch = getopt(argc, argv, "sf")) != -1) while ((ch = getopt(argc, argv, "fs")) != -1)
switch (ch) { switch (ch) {
case 'f': case 'f':
/* On Linux, "hostname -f" prints FQDN. */ /*
/* BSD "hostname" always print FQDN by * On Linux, "hostname -f" prints FQDN.
* default, so we accept but ignore -f. */ * BSD "hostname" always prints FQDN by
* default, so we accept but ignore -f.
*/
break; break;
case 's': case 's':
sflag = 1; sflag = 1;
@ -98,6 +100,6 @@ void
usage(void) usage(void)
{ {
(void)fprintf(stderr, "usage: hostname [-s] [name-of-host]\n"); (void)fprintf(stderr, "usage: hostname [-fs] [name-of-host]\n");
exit(1); exit(1);
} }