[PATCH:iceauth 10/17] Actually print command list in usage message
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Nov 15 18:38:39 PST 2013
The xauth routine this was based on took three arguments:
a file pointer, a command name, and a prefix.
If a command name is given, prints help on that command,
else if it's null, prints help on all commands.
The iceauth version has only two arguments: file pointer & command name.
It was being called with file pointer & prefix, and since the prefix
matched no command names, no help was printed.
Since the way iceauth's help list is structured doesn't make it easy
to add a prefix to every line, skip indentation for now and just pass
NULL for the command argument.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
iceauth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/iceauth.c b/iceauth.c
index 7fac493..e729ed5 100644
--- a/iceauth.c
+++ b/iceauth.c
@@ -71,8 +71,8 @@ usage (void)
fprintf (stderr, "usage: %s [-options ...] [command arg ...]\n",
ProgramName);
- fprintf (stderr, "%s\n", prefixmsg);
- print_help (stderr, " "); /* match prefix indentation */
+ fprintf (stderr, "%s", prefixmsg);
+ print_help (stderr, NULL);
fprintf (stderr, "\n%s\n", suffixmsg);
exit (1);
}
--
1.7.9.2
More information about the xorg-devel
mailing list