[PATCH:fstobdf 09/17] Print error and usage on invalid arg, instead of ignoring it

Alan Coopersmith alan.coopersmith at oracle.com
Fri Nov 15 18:38:38 PST 2013


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 fstobdf.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fstobdf.c b/fstobdf.c
index 5fe4816..255d82e 100644
--- a/fstobdf.c
+++ b/fstobdf.c
@@ -109,6 +109,11 @@ main(int argc, char *argv[])
 	    printf("%s\n", PACKAGE_STRING);
 	    exit(0);
 	}
+	else {
+	    fprintf(stderr, "%s: unrecognized option '%s'\n",
+		    argv[0], argv[i]);
+	    usage(argv[0], NULL);
+	}
     }
 
     if (fontName == NULL)
-- 
1.7.9.2



More information about the xorg-devel mailing list