diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2015-05-14 14:19:01 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2015-05-15 12:22:14 +0100 |
commit | fd6846c99f00e265f558cf0106c833b96caf977f (patch) | |
tree | 44831be4a5e81f6cbbea73e6734dbaf68b99ad14 /tests/gem_stress.c | |
parent | 7a5e1c6f0aebcfabecc3db96cb87add894530326 (diff) |
lib: Add a user data pointer to the argument parsing functions
It can be useful to have one of those to carry state between the handler
parsing the options and the rest of the test. Right now the only thing
we can do is to use global variables for that.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/gem_stress.c')
-rw-r--r-- | tests/gem_stress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_stress.c b/tests/gem_stress.c index 804684f5..472263d4 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -624,7 +624,7 @@ static void sanitize_tiles_per_buf(void) options.tiles_per_buf = options.scratch_buf_size / TILE_BYTES(options.tile_size); } -static int parse_options(int opt, int opt_index) +static int parse_options(int opt, int opt_index, void *data) { int tmp; @@ -855,7 +855,7 @@ int main(int argc, char **argv) options.check_render_cpyfn = 0; igt_simple_init_parse_opts(&argc, argv,"ds:g:c:t:rbuxmo:fp:", - long_options, NULL, parse_options); + long_options, NULL, parse_options, NULL); drm_fd = drm_open_any(); devid = intel_get_drm_devid(drm_fd); |