diff options
author | Petri Latvala <petri.latvala@intel.com> | 2019-05-23 15:26:53 +0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-05-27 12:47:43 +0300 |
commit | 0fff5e7c719178d695007bdcafda56901dcdf25e (patch) | |
tree | de4a337568e26c9e294a9d62f787e4d923c70464 /lib/igt_core.h | |
parent | c17f0cc405b67c88bda594daf98934cbc7adbf1f (diff) |
lib: Document igt_opt_handler_t semantics
Best practices for the help string formatting, along with explicit
symbols for the possible return values for the callback.
Also documented: Do not call the _parse_opts functions yourself, use
igt_main_args or igt_simple_main_args.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r-- | lib/igt_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h index cd89921e..88a95ec2 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -145,6 +145,8 @@ void __igt_fixture_end(void) __attribute__((noreturn)); /* subtest infrastructure */ jmp_buf igt_subtest_jmpbuf; typedef int (*igt_opt_handler_t)(int opt, int opt_index, void *data); +#define IGT_OPT_HANDLER_SUCCESS 0 +#define IGT_OPT_HANDLER_ERROR -2 #ifndef __GTK_DOC_IGNORE__ /* gtkdoc wants to document this forward decl */ struct option; #endif |