提交 3dc496e0 编写于 作者: P Peter Krempa

qemu: blockjob: Export functions for allocating and registering job data

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 8d82e6d9
...@@ -88,7 +88,7 @@ qemuBlockJobDataOnceInit(void) ...@@ -88,7 +88,7 @@ qemuBlockJobDataOnceInit(void)
VIR_ONCE_GLOBAL_INIT(qemuBlockJobData); VIR_ONCE_GLOBAL_INIT(qemuBlockJobData);
static qemuBlockJobDataPtr qemuBlockJobDataPtr
qemuBlockJobDataNew(qemuBlockJobType type, qemuBlockJobDataNew(qemuBlockJobType type,
const char *name) const char *name)
{ {
...@@ -111,7 +111,7 @@ qemuBlockJobDataNew(qemuBlockJobType type, ...@@ -111,7 +111,7 @@ qemuBlockJobDataNew(qemuBlockJobType type,
} }
static int int
qemuBlockJobRegister(qemuBlockJobDataPtr job, qemuBlockJobRegister(qemuBlockJobDataPtr job,
virDomainObjPtr vm, virDomainObjPtr vm,
virDomainDiskDefPtr disk) virDomainDiskDefPtr disk)
......
...@@ -82,6 +82,16 @@ struct _qemuBlockJobData { ...@@ -82,6 +82,16 @@ struct _qemuBlockJobData {
int newstate; /* qemuBlockjobState, subset of events emitted by qemu */ 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 qemuBlockJobDataPtr
qemuBlockJobDiskNew(virDomainObjPtr vm, qemuBlockJobDiskNew(virDomainObjPtr vm,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册