The aim to make it look as close to
qemuDomainNamespaceSetupDisk() as possible. The latter will call
the former and this change makes that diff easier to read.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain_namespace.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namespace.c
index 1803943fbc..18ec86816c 100644
--- a/src/qemu/qemu_domain_namespace.c
+++ b/src/qemu/qemu_domain_namespace.c
@@ -486,13 +486,13 @@ qemuDomainSetupDev(virQEMUDriverConfigPtr cfg,
static int
-qemuDomainSetupDisk(virDomainDiskDefPtr disk,
+qemuDomainSetupDisk(virStorageSourcePtr src,
const struct qemuDomainCreateDeviceData *data)
{
virStorageSourcePtr next;
bool hasNVMe = false;
- for (next = disk->src; virStorageSourceIsBacking(next); next =
next->backingStore) {
+ for (next = src; virStorageSourceIsBacking(next); next = next->backingStore) {
VIR_AUTOSTRINGLIST targetPaths = NULL;
size_t i;
@@ -531,7 +531,7 @@ qemuDomainSetupDisk(virDomainDiskDefPtr disk,
}
/* qemu-pr-helper might require access to /dev/mapper/control. */
- if (disk->src->pr &&
+ if (src->pr &&
qemuDomainCreateDevice(QEMU_DEVICE_MAPPER_CONTROL_PATH, data, true) < 0)
return -1;
@@ -551,7 +551,7 @@ qemuDomainSetupAllDisks(virDomainObjPtr vm,
VIR_DEBUG("Setting up disks");
for (i = 0; i < vm->def->ndisks; i++) {
- if (qemuDomainSetupDisk(vm->def->disks[i],
+ if (qemuDomainSetupDisk(vm->def->disks[i]->src,
data) < 0)
return -1;
}
--
2.26.2