Reuse virStorageSourceIsEmpty and rename "force" argument to
"force_probe".
---
src/qemu/qemu_domain.c | 8 +++-----
src/qemu/qemu_domain.h | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 19b935d..515bcac 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2670,20 +2670,18 @@ int
qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDiskDefPtr disk,
- bool force)
+ bool force_probe)
{
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
int ret = 0;
uid_t uid;
gid_t gid;
- int type = virStorageSourceGetActualType(disk->src);
- if (type != VIR_STORAGE_TYPE_NETWORK &&
- !disk->src->path)
+ if (virStorageSourceIsEmpty(disk->src))
goto cleanup;
if (disk->src->backingStore) {
- if (force)
+ if (force_probe)
virStorageSourceBackingStoreClear(disk->src);
else
goto cleanup;
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 4ae2c57..494e9f8 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -366,7 +366,7 @@ int qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
int qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDiskDefPtr disk,
- bool force);
+ bool force_probe);
int qemuDomainStorageFileInit(virQEMUDriverPtr driver,
virDomainObjPtr vm,
--
2.1.0