The function is now only called locally. Some code movement was
necessary to avoid forward declarations.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_blockjob.c | 80 ++++++++++++++++++++--------------------
src/qemu/qemu_blockjob.h | 6 ---
2 files changed, 40 insertions(+), 46 deletions(-)
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index d38674a9d0..32fa9876b5 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -69,45 +69,6 @@ qemuBlockJobEmitEvents(virQEMUDriverPtr driver,
}
-/**
- * qemuBlockJobUpdate:
- * @vm: domain
- * @disk: domain disk
- * @error: error (output parameter)
- *
- * Update disk's mirror state in response to a block job event stored in
- * blockJobStatus by qemuProcessHandleBlockJob event handler.
- *
- * Returns the block job event processed or -1 if there was no pending event.
- */
-int
-qemuBlockJobUpdate(virDomainObjPtr vm,
- qemuDomainAsyncJob asyncJob,
- virDomainDiskDefPtr disk,
- char **error)
-{
- qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
- qemuDomainObjPrivatePtr priv = vm->privateData;
- int status = diskPriv->blockJobStatus;
-
- if (error)
- *error = NULL;
-
- if (status != -1) {
- qemuBlockJobEventProcess(priv->driver, vm, disk, asyncJob,
- diskPriv->blockJobType,
- diskPriv->blockJobStatus);
- diskPriv->blockJobStatus = -1;
- if (error)
- VIR_STEAL_PTR(*error, diskPriv->blockJobError);
- else
- VIR_FREE(diskPriv->blockJobError);
- }
-
- return status;
-}
-
-
/**
* qemuBlockJobEventProcess:
* @driver: qemu driver
@@ -120,7 +81,7 @@ qemuBlockJobUpdate(virDomainObjPtr vm,
* from QEMU. For mirror state's that must survive libvirt
* restart, also update the domain's status XML.
*/
-void
+static void
qemuBlockJobEventProcess(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDiskDefPtr disk,
@@ -235,6 +196,45 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
}
+/**
+ * qemuBlockJobUpdate:
+ * @vm: domain
+ * @disk: domain disk
+ * @error: error (output parameter)
+ *
+ * Update disk's mirror state in response to a block job event stored in
+ * blockJobStatus by qemuProcessHandleBlockJob event handler.
+ *
+ * Returns the block job event processed or -1 if there was no pending event.
+ */
+int
+qemuBlockJobUpdate(virDomainObjPtr vm,
+ qemuDomainAsyncJob asyncJob,
+ virDomainDiskDefPtr disk,
+ char **error)
+{
+ qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
+ qemuDomainObjPrivatePtr priv = vm->privateData;
+ int status = diskPriv->blockJobStatus;
+
+ if (error)
+ *error = NULL;
+
+ if (status != -1) {
+ qemuBlockJobEventProcess(priv->driver, vm, disk, asyncJob,
+ diskPriv->blockJobType,
+ diskPriv->blockJobStatus);
+ diskPriv->blockJobStatus = -1;
+ if (error)
+ VIR_STEAL_PTR(*error, diskPriv->blockJobError);
+ else
+ VIR_FREE(diskPriv->blockJobError);
+ }
+
+ return status;
+}
+
+
/**
* qemuBlockJobSyncBegin:
* @disk: domain disk
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index cee3ee21c4..c14d26a6a1 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -30,12 +30,6 @@ int qemuBlockJobUpdate(virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob,
virDomainDiskDefPtr disk,
char **error);
-void qemuBlockJobEventProcess(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- virDomainDiskDefPtr disk,
- qemuDomainAsyncJob asyncJob,
- int type,
- int status);
void qemuBlockJobSyncBegin(virDomainDiskDefPtr disk);
void qemuBlockJobSyncEnd(virDomainObjPtr vm,
--
2.19.2