Re: [PATCHv2 15/27] uml: reject unknown flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]