diff options
author | Stéphane Aulery <lkppo@free.fr> | 2013-07-07 03:15:39 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-07 10:42:37 -0700 |
commit | af9ea390e95320e683c761cbd61eaf1c0dbaefed (patch) | |
tree | ca47418d48f9da2823d8614e413aae43db2742a8 /xvinfo.c | |
parent | 6114ecae7d7aa0bed41d01d360b193f27a500942 (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>
Diffstat (limited to 'xvinfo.c')
-rw-r--r-- | xvinfo.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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(); |