From de99e15db60864cdb177f8fb380e79bb510ff9ea Mon Sep 17 00:00:00 2001 From: Lyude Date: Wed, 19 Jul 2017 13:46:01 -0400 Subject: igt_core: Add the rest of Paul's patch I forgot by accident Whoops, I meant to commit the entirity of Paul's patch but it appears I forgot to stage all of the changes to igt_core. This should have been included in the previous commit. Signed-off-by: Lyude --- lib/igt_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/igt_core.c') diff --git a/lib/igt_core.c b/lib/igt_core.c index 5a3b00e8..028ef6bd 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -293,7 +293,10 @@ static struct { } log_buffer; static pthread_mutex_t log_buffer_mutex = PTHREAD_MUTEX_INITIALIZER; +#ifdef HAVE_GLIB GKeyFile *igt_key_file; +#endif + char *frame_dump_path; const char *igt_test_name(void) @@ -618,6 +621,7 @@ static void oom_adjust_for_doom(void) } +#ifdef HAVE_GLIB static int config_parse(void) { GError *error = NULL; @@ -643,6 +647,7 @@ static int config_parse(void) return 0; } +#endif static int common_init(int *argc, char **argv, const char *extra_short_opts, @@ -799,6 +804,7 @@ static int common_init(int *argc, char **argv, snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir()); } +#ifdef HAVE_GLIB igt_key_file = g_key_file_new(); ret = g_key_file_load_from_file(igt_key_file, key_file_loc, G_KEY_FILE_NONE, &error); @@ -811,6 +817,7 @@ static int common_init(int *argc, char **argv, } ret = config_parse(); +#endif out: if (!key_file_env && key_file_loc) @@ -1423,8 +1430,10 @@ void igt_exit(void) { igt_exit_called = true; +#ifdef HAVE_GLIB if (igt_key_file) g_key_file_free(igt_key_file); +#endif if (run_single_subtest && !run_single_subtest_found) { igt_warn("Unknown subtest: %s\n", run_single_subtest); -- cgit v1.2.3