summaryrefslogtreecommitdiff
path: root/xvinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'xvinfo.c')
-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();