[PATCH i-g-t] testdisplay: set a non-zero exit code if getopt detected an error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Thomas Wood <thomas.wood@xxxxxxxxx>
---
 tests/testdisplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index f60e66d..20b0615 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -670,7 +670,7 @@ static void __attribute__((noreturn)) usage(char *name)
 	igt_info("\t\t<vdisp>,<vsync-start>,<vsync-end>,<vtotal>\n");
 	igt_info("\t\ttest force mode\n");
 	igt_info("\tDefault is to test all modes.\n");
-	exit(0);
+	exit((optopt) ? -1 : 0);
 }
 
 #define dump_resource(res) if (res) dump_##res()
-- 
1.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux