testdisplay: set a non-zero exit code if getopt detected an error

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood 2014-07-25 15:35:36 +01:00
parent 2fae99bf2c
commit 8fc4107c91

View File

@ -672,7 +672,7 @@ static void __attribute__((noreturn)) usage(char *name)
igt_info("\t\t<vdisp>,<vsync-start>,<vsync-end>,<vtotal>\n"); igt_info("\t\t<vdisp>,<vsync-start>,<vsync-end>,<vtotal>\n");
igt_info("\t\ttest force mode\n"); igt_info("\t\ttest force mode\n");
igt_info("\tDefault is to test all modes.\n"); igt_info("\tDefault is to test all modes.\n");
exit(0); exit((optopt) ? -1 : 0);
} }
#define dump_resource(res) if (res) dump_##res() #define dump_resource(res) if (res) dump_##res()