When parsing the status XML we need to register all existing jobs.
Export the functions so that they are usable in other modules.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_blockjob.c | 4 ++--
src/qemu/qemu_blockjob.h | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index bba1b9d656..78d4938684 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -78,7 +78,7 @@ qemuBlockJobDataOnceInit(void)
VIR_ONCE_GLOBAL_INIT(qemuBlockJobData);
-static qemuBlockJobDataPtr
+qemuBlockJobDataPtr
qemuBlockJobDataNew(qemuBlockJobType type,
const char *name)
{
@@ -101,7 +101,7 @@ qemuBlockJobDataNew(qemuBlockJobType type,
}
-static int
+int
qemuBlockJobRegister(qemuBlockJobDataPtr job,
virDomainObjPtr vm,
virDomainDiskDefPtr disk)
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index 77298a4bea..fe16badbc8 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -82,6 +82,16 @@ struct _qemuBlockJobData {
int newstate; /* qemuBlockjobState, subset of events emitted by qemu */
};
+int
+qemuBlockJobRegister(qemuBlockJobDataPtr job,
+ virDomainObjPtr vm,
+ virDomainDiskDefPtr disk)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+
+qemuBlockJobDataPtr
+qemuBlockJobDataNew(qemuBlockJobType type,
+ const char *name)
+ ATTRIBUTE_NONNULL(2);
qemuBlockJobDataPtr
qemuBlockJobDiskNew(virDomainObjPtr vm,
--
2.21.0