[libvirt] [PATCH v2 5/9] libxl: Ignore no-op flag during virDomainUndefine

Eric Blake eblake at redhat.com
Tue Jul 9 17:46:34 UTC 2019


Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op,
and in line with the recent doc tweak in commit c049f022.

Signed-off-by: Eric Blake <eblake at redhat.com>
---
 src/libxl/libxl_driver.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 731700ded6..89959890c3 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2921,7 +2921,9 @@ libxlDomainUndefineFlags(virDomainPtr dom,
     char *name = NULL;
     int ret = -1;

-    virCheckFlags(VIR_DOMAIN_UNDEFINE_MANAGED_SAVE, -1);
+    /* No snapshot support, so we can trivially ignore that flag.  */
+    virCheckFlags(VIR_DOMAIN_UNDEFINE_MANAGED_SAVE |
+                  VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1);

     if (!(vm = libxlDomObjFromDomain(dom)))
         goto cleanup;
-- 
2.20.1




More information about the libvir-list mailing list