[PATCH 3/4] storage_driver & test_driver: allow VIR_STORAGE_POOL_DEFINE_VALIDATE flag

Kristina Hanicova posted 4 patches 4 years, 5 months ago
[PATCH 3/4] storage_driver & test_driver: allow VIR_STORAGE_POOL_DEFINE_VALIDATE flag
Posted by Kristina Hanicova 4 years, 5 months ago
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
---
 src/storage/storage_driver.c | 4 ++--
 src/test/test_driver.c       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 37b84d038a..51daf6a05d 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -816,9 +816,9 @@ storagePoolDefineXML(virConnectPtr conn,
     virObjectEvent *event = NULL;
     g_autoptr(virStoragePoolDef) newDef = NULL;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_STORAGE_POOL_DEFINE_VALIDATE, NULL);
 
-    if (!(newDef = virStoragePoolDefParseString(xml, 0)))
+    if (!(newDef = virStoragePoolDefParseString(xml, flags)))
         goto cleanup;
 
     if (virXMLCheckIllegalChars("name", newDef->name, "\n") < 0)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 33bab0f9d3..2f19b7c520 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -6705,10 +6705,10 @@ testStoragePoolDefineXML(virConnectPtr conn,
     virObjectEvent *event = NULL;
     g_autoptr(virStoragePoolDef) newDef = NULL;
 
-    virCheckFlags(0, NULL);
+    virCheckFlags(VIR_STORAGE_POOL_DEFINE_VALIDATE, NULL);
 
     virObjectLock(privconn);
-    if (!(newDef = virStoragePoolDefParseString(xml, 0)))
+    if (!(newDef = virStoragePoolDefParseString(xml, flags)))
         goto cleanup;
 
     newDef->capacity = defaultPoolCap;
-- 
2.31.1