mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu: monitor: Finish implementation of infrastructure for 'query-jobs'
Commit ed56851f1bc6f5 didn't wire up fetching of the statistics for the job which are reported by 'query-jobs'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
27660f7990
commit
01270a9a5f
@ -154,8 +154,8 @@ struct _qemuMonitorJobInfo {
|
||||
qemuMonitorJobType type;
|
||||
qemuMonitorJobStatus status;
|
||||
char *error;
|
||||
long long progressCurrent;
|
||||
long long progressTotal;
|
||||
unsigned long long progressCurrent;
|
||||
unsigned long long progressTotal;
|
||||
};
|
||||
|
||||
|
||||
|
@ -9221,6 +9221,12 @@ qemuMonitorJSONGetJobInfoOne(virJSONValuePtr data)
|
||||
job->id = g_strdup(id);
|
||||
job->error = g_strdup(errmsg);
|
||||
|
||||
/* failure to fetch progress stats is not fatal */
|
||||
ignore_value(virJSONValueObjectGetNumberUlong(data, "current-progress",
|
||||
&job->progressCurrent));
|
||||
ignore_value(virJSONValueObjectGetNumberUlong(data, "total-progress",
|
||||
&job->progressTotal));
|
||||
|
||||
return g_steal_pointer(&job);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user