diff --git a/bin/hostname/hostname.1 b/bin/hostname/hostname.1 index 881fbf2ec4d5..3c20a031c1f7 100644 --- a/bin/hostname/hostname.1 +++ b/bin/hostname/hostname.1 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)hostname.1 8.1 (Berkeley) 5/31/93 -.\" $Id: hostname.1,v 1.6 1994/09/22 09:25:20 mycroft Exp $ +.\" $Id: hostname.1,v 1.7 1994/09/22 09:41:26 mycroft Exp $ .\" .Dd May 31, 1993 .Dt HOSTNAME 1 @@ -58,9 +58,8 @@ Trims off any domain information from the printed name. .El .Sh SEE ALSO -.Xr getdomainname 2 , +.Xr domainname 1 , .Xr gethostname 2 , -.Xr setdomainname 2 , .Xr sethostname 2 .Sh HISTORY The diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c index 9ff716f01b3b..81f50331d2a8 100644 --- a/bin/hostname/hostname.c +++ b/bin/hostname/hostname.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)hostname.c 8.1 (Berkeley) 5/31/93";*/ -static char *rcsid = "$Id: hostname.c,v 1.6 1994/09/22 09:25:22 mycroft Exp $"; +static char *rcsid = "$Id: hostname.c,v 1.7 1994/09/22 09:41:28 mycroft Exp $"; #endif /* not lint */ #include @@ -53,7 +53,7 @@ static char *rcsid = "$Id: hostname.c,v 1.6 1994/09/22 09:25:22 mycroft Exp $"; void usage __P((void)); int -main(argc,argv) +main(argc, argv) int argc; char *argv[]; { @@ -73,6 +73,9 @@ main(argc,argv) argc -= optind; argv += optind; + if (argc > 1) + usage(); + if (*argv) { if (sethostname(*argv, strlen(*argv))) err(1, "sethostname");