From ad3f90f6ca9de7fee945fa9b9a901caaf14871a9 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
Date: Thu, 15 Nov 2001 15:46:45 +0000
Subject: [PATCH] Deuglify the usage message by putting the program name after
the "usage:" string. This is how most (all?) other programs in the system do
it.
PR: 31596
Submitted by: Cyrille Lefevre
---
bin/kenv/kenv.c | 3 ++-
usr.bin/kenv/kenv.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/kenv/kenv.c b/bin/kenv/kenv.c
index 4e5970a2c8ab..4704d510fd2f 100644
--- a/bin/kenv/kenv.c
+++ b/bin/kenv/kenv.c
@@ -38,7 +38,8 @@ static char sbuf[1024];
static void
usage(void)
{
- errx(1, "usage: [-h] [variable]");
+ (void)fprintf(stderr, "usage: kenv [-h] [variable]\n");
+ exit(1);
}
int
diff --git a/usr.bin/kenv/kenv.c b/usr.bin/kenv/kenv.c
index 4e5970a2c8ab..4704d510fd2f 100644
--- a/usr.bin/kenv/kenv.c
+++ b/usr.bin/kenv/kenv.c
@@ -38,7 +38,8 @@ static char sbuf[1024];
static void
usage(void)
{
- errx(1, "usage: [-h] [variable]");
+ (void)fprintf(stderr, "usage: kenv [-h] [variable]\n");
+ exit(1);
}
int