summaryrefslogtreecommitdiff
path: root/bin/hostname
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2001-09-06 13:29:09 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2001-09-06 13:29:09 +0000
commite9adfbcaf16f3287027630e6f8926cbf5195af9f (patch)
treeb20ad65ef5726147335786dc24cc1d1a00d5c7f3 /bin/hostname
parent99d09c2c5ce8a0c313c2a485a4a6a8ed24e805c5 (diff)
o) __progname aria;
millert@ ok.
Diffstat (limited to 'bin/hostname')
-rw-r--r--bin/hostname/hostname.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c
index 85ad5cfae8b..5c7d394db03 100644
--- a/bin/hostname/hostname.c
+++ b/bin/hostname/hostname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostname.c,v 1.3 1996/08/02 12:40:55 deraadt Exp $ */
+/* $OpenBSD: hostname.c,v 1.4 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: hostname.c,v 1.10 1995/09/07 06:28:40 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)hostname.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: hostname.c,v 1.3 1996/08/02 12:40:55 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: hostname.c,v 1.4 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,8 @@ static char rcsid[] = "$OpenBSD: hostname.c,v 1.3 1996/08/02 12:40:55 deraadt Ex
#include <string.h>
#include <unistd.h>
+extern char *__progname;
+
void usage __P((void));
int
@@ -97,7 +99,6 @@ main(argc, argv)
void
usage()
{
-
- (void)fprintf(stderr, "usage: hostname [-s] [name-of-host]\n");
+ (void)fprintf(stderr, "usage: %s [-s] [name-of-host]\n", __progname);
exit(1);
}