]> Git Repo - qemu.git/commitdiff
qga: report error on keyfile dump error
authorMarc-André Lureau <[email protected]>
Thu, 1 Jun 2017 12:38:47 +0000 (16:38 +0400)
committerMichael Roth <[email protected]>
Tue, 18 Jul 2017 00:22:14 +0000 (19:22 -0500)
Signed-off-by: Marc-André Lureau <[email protected]>
Cc:[email protected]
Signed-off-by: Michael Roth <[email protected]>
qga/main.c

index dcd6104bb00065c58ef29cafb306a01d833225a3..1b381d0bf3547a32c9295f71da135ff00daa298b 100644 (file)
@@ -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);
This page took 0.031685 seconds and 4 git commands to generate.