[libvirt] [PATCH v2 4/9] bhyve: Ignore no-op flag during virDomainUndefine

Eric Blake eblake at redhat.com
Tue Jul 9 17:46:33 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/bhyve/bhyve_driver.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 4ce9ef0b95..84720e89e7 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -584,7 +584,11 @@ bhyveDomainUndefineFlags(virDomainPtr domain, unsigned int flags)
     virDomainObjPtr vm;
     int ret = -1;

-    virCheckFlags(0, -1);
+    /* No managed save, so we explicitly reject
+     * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE.  No snapshot metadata for
+     * bhyve, so we can trivially ignore that flag.  */
+    virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1);
+
     if (!(vm = bhyveDomObjFromDomain(domain)))
         goto cleanup;

-- 
2.20.1




More information about the libvir-list mailing list