summaryrefslogtreecommitdiff
path: root/lib/igt_core.c
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2014-07-23 16:29:39 +0100
committerThomas Wood <thomas.wood@intel.com>2014-07-23 16:43:05 +0100
commit784344ef8896e47af13fbb4377b020f33ce4c93c (patch)
tree135235b3e8087011641b9e2a33da21f1589d3e10 /lib/igt_core.c
parent561d519e67f31c81d338601ce859d32188c4bd7b (diff)
lib: add an exit code to use when invalid options are specified
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r--lib/igt_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c
index d90e6bbb..29c969ba 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -389,15 +389,15 @@ out:
if (!test_with_subtests) {
if (run_single_subtest) {
igt_warn("Unknown subtest: %s\n", run_single_subtest);
- exit(-1);
+ exit(IGT_EXIT_INVALID);
}
if (list_subtests)
- exit(-1);
+ exit(IGT_EXIT_INVALID);
}
if (ret < 0)
/* exit with no error for -h/--help */
- exit(ret == -1 ? 0 : ret);
+ exit(ret == -1 ? 0 : IGT_EXIT_INVALID);
print_version();
@@ -758,7 +758,7 @@ void igt_exit(void)
if (run_single_subtest && !run_single_subtest_found) {
igt_warn("Unknown subtest: %s\n", run_single_subtest);
- exit(-1);
+ exit(IGT_EXIT_INVALID);
}