diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-06-01 16:38:47 +0400 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2017-07-17 19:22:14 -0500 |
commit | cbcd9ba1b76425915c58c67153432ff1d743aefd (patch) | |
tree | bee879cfe1211da0ba23a9ce215332d8772e0bb2 /qga/main.c | |
parent | f8837b3765f507409a2dd1946db60144fe7fb71e (diff) | |
download | qemu-cbcd9ba1b76425915c58c67153432ff1d743aefd.zip qemu-cbcd9ba1b76425915c58c67153432ff1d743aefd.tar.gz qemu-cbcd9ba1b76425915c58c67153432ff1d743aefd.tar.bz2 |
qga: report error on keyfile dump error
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc:qemu-trivial@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/main.c')
-rw-r--r-- | qga/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1074,7 +1074,12 @@ static void config_dump(GAConfig *config) g_free(tmp); tmp = g_key_file_to_data(keyfile, NULL, &error); - printf("%s", tmp); + if (error) { + g_critical("Failed to dump keyfile: %s", error->message); + g_clear_error(&error); + } else { + printf("%s", tmp); + } g_free(tmp); g_key_file_free(keyfile); |