[PATCH:appres 01/17] Print which option was in error along with usage message
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Nov 15 18:38:30 PST 2013
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
appres.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/appres.c b/appres.c
index 2f43d2d..fad870f 100644
--- a/appres.c
+++ b/appres.c
@@ -156,8 +156,11 @@ main (int argc, char *argv[])
printf("%s\n", PACKAGE_STRING);
exit(0);
}
- else if (argv[i][0] == '-')
+ else if (argv[i][0] == '-') {
+ fprintf(stderr, "%s: unrecognized option '%s'\n",
+ ProgramName, argv[i]);
usage();
+ }
else if (!cname)
cname = argv[i];
else if (!iname)
--
1.7.9.2
More information about the xorg-devel
mailing list