Re: [libvirt] [PATCH 0/2] Enhance checking of supported flags in drivers

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

 



On Fri, Apr 09, 2010 at 04:40:59PM +0200, Jiri Denemark wrote:
> I think we need a simple and consistent way of checking whether flags passed
> to API entry points in drivers are valid/supported or not. So far some entry
> points don't check flags at all and some checks for 0 when no flags are
> expected/supported.
> 
> The first patch introduces a macro which can be called with a whitelist of
> supported flags (more info about it inside the patch). I don't particularily
> like introducing a new header file but non of existing header files looked
> like a good place to stick this macro in. If you think such a place exist,
> I'll be very happy to adapt the patch.
> 
> The second patch changes all API calls introduced since the last release to
> use the macro for checking valid flags.
> 
> I'm not sure if we can change existing API calls to do the same as it could
> break some badly written apps which pass invalid flags. My opinion is that we
> may often do that as such apps don't use the API in a documented/valid way.
> But even if my thinking is correct, we don't want to change it before 0.8.0.

  In general I think it's a good idea, but instead of adding a new
header, I would put it in internals.h for general availability.
I agree it's a post-0.8.0 change :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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