summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Aulery <lkppo@free.fr>2013-07-07 03:15:39 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-07 10:42:37 -0700
commitaf9ea390e95320e683c761cbd61eaf1c0dbaefed (patch)
treeca47418d48f9da2823d8614e413aae43db2742a8
parent6114ecae7d7aa0bed41d01d360b193f27a500942 (diff)
Use real program name for help message
Signed-off-by: Stéphane Aulery <lkppo@free.fr> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xvinfo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xvinfo.c b/xvinfo.c
index 8df7aa6..f1a6056 100644
--- a/xvinfo.c
+++ b/xvinfo.c
@@ -10,10 +10,12 @@
#include <string.h>
#include <ctype.h>
+static char *progname;
+
static void _X_NORETURN
PrintUsage(void)
{
- fprintf(stderr, "Usage: xvinfo [-display host:dpy] [-short] [-version]\n");
+ fprintf(stderr, "Usage: %s [-display host:dpy] [-short] [-version]\n", progname);
exit(0);
}
@@ -33,6 +35,8 @@ main(int argc, char *argv[])
char *disname = NULL;
char shortmode = 0;
+ progname = argv[0];
+
if ((argc > 4))
PrintUsage();