The field can be used by jobs to add an optional error message to a
completed (failed) job.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_domain.c | 3 +++
src/qemu/qemu_domain.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 13b1c4e402..dba222dde5 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -308,6 +308,7 @@ qemuDomainDisableNamespace(virDomainObjPtr vm,
void
qemuDomainJobInfoFree(qemuDomainJobInfoPtr info)
{
+ g_free(info->errmsg);
g_free(info);
}
@@ -319,6 +320,8 @@ qemuDomainJobInfoCopy(qemuDomainJobInfoPtr info)
memcpy(ret, info, sizeof(*info));
+ ret->errmsg = g_strdup(info->errmsg);
+
return ret;
}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index c7f28b04c2..639d27d8a5 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -175,6 +175,8 @@ struct _qemuDomainJobInfo {
qemuDomainBackupStats backup;
} stats;
qemuDomainMirrorStats mirrorStats;
+
+ char *errmsg; /* optional error message for failed completed jobs */
};
void
--
2.26.0