---
src/qemu/qemu_domain.c | 23 -----------------------
src/qemu/qemu_domain.h | 5 -----
src/qemu/qemu_process.c | 10 +++++-----
3 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index bf2ce29bf..d3d5dbac6 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7720,29 +7720,6 @@ qemuDomainPrepareDiskSourceTLS(virStorageSourcePtr src,
}
-/* qemuProcessPrepareDiskSource:
- * @def: live domain definition
- * @driver: qemu driver
- *
- * Returns 0 on success, -1 on failure
- */
-int
-qemuDomainPrepareDiskSource(virDomainDefPtr def,
- virQEMUDriverConfigPtr cfg)
-{
- size_t i;
-
- for (i = 0; i < def->ndisks; i++) {
- if (qemuDomainPrepareDiskSourceTLS(def->disks[i]->src,
- def->disks[i]->info.alias,
- cfg) < 0)
- return -1;
- }
-
- return 0;
-}
-
-
int
qemuDomainPrepareShmemChardev(virDomainShmemDefPtr shmem)
{
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 914f2bec9..01e8d629e 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -873,11 +873,6 @@ qemuDomainPrepareDiskSourceTLS(virStorageSourcePtr src,
virQEMUDriverConfigPtr cfg)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
-int
-qemuDomainPrepareDiskSource(virDomainDefPtr def,
- virQEMUDriverConfigPtr cfg)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
int qemuDomainPrepareShmemChardev(virDomainShmemDefPtr shmem)
ATTRIBUTE_NONNULL(1);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ad7c7ee81..84792c2a7 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5279,6 +5279,7 @@ static int
qemuProcessPrepareDomainStorage(virConnectPtr conn,
virQEMUDriverPtr driver,
virDomainObjPtr vm,
+ virQEMUDriverConfigPtr cfg,
unsigned int flags)
{
size_t i;
@@ -5295,6 +5296,9 @@ qemuProcessPrepareDomainStorage(virConnectPtr conn,
/* disk source was dropped */
continue;
}
+
+ if (qemuDomainPrepareDiskSourceTLS(disk->src, disk->info.alias, cfg) <
0)
+ return -1;
}
return 0;
@@ -5378,7 +5382,7 @@ qemuProcessPrepareDomain(virConnectPtr conn,
goto cleanup;
VIR_DEBUG("Setting up storage");
- if (qemuProcessPrepareDomainStorage(conn, driver, vm, flags) < 0)
+ if (qemuProcessPrepareDomainStorage(conn, driver, vm, cfg, flags) < 0)
goto cleanup;
/* Drop possibly missing disks from the definition. */
@@ -5389,10 +5393,6 @@ qemuProcessPrepareDomain(virConnectPtr conn,
if (qemuDomainMasterKeyCreate(vm) < 0)
goto cleanup;
- VIR_DEBUG("Prepare disk source backends for TLS");
- if (qemuDomainPrepareDiskSource(vm->def, cfg) < 0)
- goto cleanup;
-
VIR_DEBUG("Prepare chardev source backends for TLS");
qemuDomainPrepareChardevSource(vm->def, cfg);
--
2.14.1