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

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

 



2011/7/8 Eric Blake <eblake@xxxxxxxxxx>:
> * src/uml/uml_driver.c (umlOpen, umlDomainGetXMLDesc)
> (umlDomainBlockPeek): Reject unknown flags.
> ---
>  src/uml/uml_driver.c |   14 +++++++++++---
>  1 files changed, 11 insertions(+), 3 deletions(-)
>

> @@ -1559,11 +1562,14 @@ cleanup:
>
>
>  static char *umlDomainGetXMLDesc(virDomainPtr dom,
> -                                 unsigned int flags ATTRIBUTE_UNUSED) {
> +                                 unsigned int flags)
> +{
>     struct uml_driver *driver = dom->conn->privateData;
>     virDomainObjPtr vm;
>     char *ret = NULL;
>
> +    virCheckFlags(0, NULL);
> +
>     umlDriverLock(driver);
>     vm = virDomainFindByUUID(&driver->domains, dom->uuid);
>     umlDriverUnlock(driver);

Don't get fooled by the ATTRIBUTE_UNUSED again. All *DomainGetXMLDesc
use virDomainDefFormat and have to accept all flags that
virDomainDefFormat accepts. I suggest to recheck your series for this
pattern, here it's just the first time that I notice it.

ACK, with that virCheckFlags loosened correctly.

-- 
Matthias Bolte
http://photron.blogspot.com

--
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]