On 7/8/19 10:37 PM, Eric Blake wrote: > We can ignore flags rather than rejecting them as unknown since a > correct implementation of those flags is a no-op given that bhyve > lacks managed save or snapshots. > > Signed-off-by: Eric Blake <[email protected]> > --- > src/bhyve/bhyve_driver.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c > index ffda7853b8..c2378c536f 100644 > --- a/src/bhyve/bhyve_driver.c > +++ b/src/bhyve/bhyve_driver.c > @@ -584,7 +584,10 @@ bhyveDomainUndefineFlags(virDomainPtr domain, unsigned > int flags) > virDomainObjPtr vm; > int ret = -1; > > - virCheckFlags(0, -1); > + /* We have no managed save or snapshots, so we can ignore those flags */ > + virCheckFlags(VIR_DOMAIN_UNDEFINE_MANAGED_SAVE | > + VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, NULL);
Returning NULL is wrong; this should be -1. What's more, this disagrees
with esx, which does:
/* No managed save, so we explicitly reject
* VIR_DOMAIN_UNDEFINE_MANAGED_SAVE. No snapshot metadata for
* ESX, so we can trivially ignore that flag. */
virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1);
so I'll use that construct in v2.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
