On 07/14/2011 01:21 AM, Matthias Bolte wrote:
> +++ w/src/uml/uml_driver.c
> @@ -1599,7 +1599,9 @@ static char *umlDomainGetXMLDesc(virDomainPtr dom,
> virDomainObjPtr vm;
> char *ret = NULL;
>
> - virCheckFlags(0, NULL);
> + virCheckFlags(VIR_DOMAIN_XML_SECURE |
> + VIR_DOMAIN_XML_INACTIVE |
> + VIR_DOMAIN_XML_UPDATE_CPU, NULL);
>
> umlDriverLock(driver);
> vm = virDomainFindByUUID(&driver->domains, dom->uuid);
I'm not sure if it's a good idea to add the flags check for this set
of flags at the driver level. Maybe it should be moved one level down
into virDomainDefFormat. This avoids touching all drivers should we
ever add a new VIR_DOMAIN_XML_* flag.
Interesting thought. I guess that means a bit more work on my side (I'd
already made the change to make all the drivers duplicate the check, but
I like the idea of having all drivers defer the check down to the common
helper).
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org