Commit f573f84eb7 introduced flawed logic which would cause a regression
in creating of lvm volumes when neither libblkid nor parted are
installed.
Fix the logic so that it triggers only if NO_OVERWRITE was specified
explicitly.
---
src/storage/storage_backend_logical.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/storage/storage_backend_logical.c
b/src/storage/storage_backend_logical.c
index 6a6720e22..77fc0d3c2 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -778,7 +778,7 @@ virStorageBackendLogicalBuildPool(virConnectPtr conn
ATTRIBUTE_UNUSED,
/* The blkid FS and Part probing code doesn't know "lvm2" (this
* pool's only format type), but it does know "LVM2_member", so
* we'll pass that here */
- if (!(flags & VIR_STORAGE_POOL_BUILD_OVERWRITE) &&
+ if ((flags & VIR_STORAGE_POOL_BUILD_NO_OVERWRITE) &&
!virStorageBackendDeviceIsEmpty(path, "LVM2_member", true))
goto cleanup;
--
2.11.0