diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2006-12-08 07:47:08 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2006-12-08 07:47:08 +0000 |
| commit | 8abbcd291088a7ef78b97d7343b17df19ddeaf74 (patch) | |
| tree | d9ea68930cb6723fe4fed8886b7bd121941f20e1 /bin/hostname | |
| parent | 8d3027e20370e3d787de066ad1797632a746c8f4 (diff) | |
Notes
Diffstat (limited to 'bin/hostname')
| -rw-r--r-- | bin/hostname/hostname.1 | 3 | ||||
| -rw-r--r-- | bin/hostname/hostname.c | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/bin/hostname/hostname.1 b/bin/hostname/hostname.1 index 62df0df44235f..bfff27baa6c6e 100644 --- a/bin/hostname/hostname.1 +++ b/bin/hostname/hostname.1 @@ -37,8 +37,7 @@ .Nd set or print name of current host system .Sh SYNOPSIS .Nm -.Op Fl f -.Op Fl s +.Op Fl fs .Op Ar name-of-host .Sh DESCRIPTION The diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c index dd3f7e9970b07..7aaca9ccda70f 100644 --- a/bin/hostname/hostname.c +++ b/bin/hostname/hostname.c @@ -58,12 +58,14 @@ main(int argc, char *argv[]) char *p, hostname[MAXHOSTNAMELEN]; sflag = 0; - while ((ch = getopt(argc, argv, "sf")) != -1) + while ((ch = getopt(argc, argv, "fs")) != -1) switch (ch) { case 'f': - /* On Linux, "hostname -f" prints FQDN. */ - /* BSD "hostname" always print FQDN by - * default, so we accept but ignore -f. */ + /* + * On Linux, "hostname -f" prints FQDN. + * BSD "hostname" always prints FQDN by + * default, so we accept but ignore -f. + */ break; case 's': sflag = 1; @@ -98,6 +100,6 @@ 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); } |
