]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - job-qmp.c
qemu-ga: document vsock-listen in the man page
[thirdparty/qemu.git] / job-qmp.c
index 410775df61870060f3af5768ea45f506b6b1566e..fecc939ebd951aa3bb863400b71c3bd27d874c84 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"
@@ -144,10 +143,11 @@ static JobInfo *job_query_single(Job *job, Error **errp)
         .id                 = g_strdup(job->id),
         .type               = job_type(job),
         .status             = job->status,
-        .current_progress   = job->progress_current,
-        .total_progress     = job->progress_total,
-        .has_error          = !!job->error,
-        .error              = g_strdup(job->error),
+        .current_progress   = job->progress.current,
+        .total_progress     = job->progress.total,
+        .has_error          = !!job->err,
+        .error              = job->err ? \
+                              g_strdup(error_get_pretty(job->err)) : NULL,
     };
 
     return info;