]> git.proxmox.com Git - mirror_qemu.git/blobdiff - job-qmp.c
migration/postcopy: PostcopyState is already set in loadvm_postcopy_handle_advise()
[mirror_qemu.git] / job-qmp.c
index 410775df61870060f3af5768ea45f506b6b1566e..fbfed25a00067c5035bfde3d7b89c4754527159a 100644 (file)
--- a/job-qmp.c
+++ b/job-qmp.c
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu-common.h"
 #include "qemu/job.h"
 #include "qapi/qapi-commands-job.h"
 #include "qapi/error.h"
@@ -146,8 +145,9 @@ static JobInfo *job_query_single(Job *job, Error **errp)
         .status             = job->status,
         .current_progress   = job->progress_current,
         .total_progress     = job->progress_total,
-        .has_error          = !!job->error,
-        .error              = g_strdup(job->error),
+        .has_error          = !!job->err,
+        .error              = job->err ? \
+                              g_strdup(error_get_pretty(job->err)) : NULL,
     };
 
     return info;