Signed-off-by: Jon A. Cruz <j...@osg.samsung.com>
---
 tools/zunitc/src/main.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/zunitc/src/main.c b/tools/zunitc/src/main.c
index 3e155d8..9a110d4 100644
--- a/tools/zunitc/src/main.c
+++ b/tools/zunitc/src/main.c
@@ -38,7 +38,16 @@ main(int argc, char* argv[])
        int rc = zuc_initialize(&argc, argv, &helped);
 
        if ((rc == EXIT_SUCCESS) && !helped) {
-               rc = ZUC_RUN_TESTS();
+               /* Stop if any unrecognized parameters were encountered. */
+               if (argc > 1) {
+                       printf("%s: unrecognized option '%s'\n",
+                              argv[0], argv[1]);
+                       printf("Try '%s --help' for more information.\n",
+                              argv[0]);
+                       rc = EXIT_FAILURE;
+               } else {
+                       rc = ZUC_RUN_TESTS();
+               }
        }
 
        zuc_cleanup();
-- 
2.1.0

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to