Signed-off-by Steven Albertson <sralbert42(a)gmail.com>
---
src/qemu/qemu_block.c | 15 +++++++--------
src/qemu/qemu_block.h | 6 ++----
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 66e6301210..8081bced9d 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -339,8 +339,7 @@ qemuBlockDiskDetectNodes(virDomainDiskDefPtr disk,
int
-qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+qemuBlockNodeNamesDetect(virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
@@ -354,13 +353,13 @@ qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QUERY_NAMED_BLOCK_NODES))
return 0;
- if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
+ if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0)
return -1;
data = qemuMonitorQueryNamedBlockNodes(qemuDomainGetMonitor(vm));
blockstats = qemuMonitorQueryBlockstats(qemuDomainGetMonitor(vm), false);
- if (qemuDomainObjExitMonitor(driver, vm) < 0 || !data || !blockstats)
+ if (qemuDomainObjExitMonitor(priv->driver, vm) < 0 || !data || !blockstats)
goto cleanup;
if (!(disktable = qemuBlockNodeNameGetBackingChain(data, blockstats)))
@@ -1689,14 +1688,14 @@ qemuBlockStorageSourceAttachRollback(qemuMonitorPtr mon,
* monitor internally.
*/
int
-qemuBlockStorageSourceDetachOneBlockdev(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+qemuBlockStorageSourceDetachOneBlockdev(virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob,
virStorageSourcePtr src)
{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
int ret;
- if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
+ if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0)
return -1;
ret = qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), src->nodeformat);
@@ -1704,7 +1703,7 @@ qemuBlockStorageSourceDetachOneBlockdev(virQEMUDriverPtr driver,
if (ret == 0)
ret = qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), src->nodestorage);
- if (qemuDomainObjExitMonitor(driver, vm) < 0)
+ if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
return -1;
return ret;
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index fd8984e60b..725ce936d5 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -47,8 +47,7 @@ qemuBlockNodeNameGetBackingChain(virJSONValuePtr namednodesdata,
virJSONValuePtr blockstats);
int
-qemuBlockNodeNamesDetect(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+qemuBlockNodeNamesDetect(virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob);
virHashTablePtr
@@ -112,8 +111,7 @@ qemuBlockStorageSourceAttachRollback(qemuMonitorPtr mon,
qemuBlockStorageSourceAttachDataPtr data);
int
-qemuBlockStorageSourceDetachOneBlockdev(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
+qemuBlockStorageSourceDetachOneBlockdev(virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob,
virStorageSourcePtr src);
--
2.17.1