[libvirt] [PATCH] qemu: Move some functions to qemu_capspriv.h

Martin Kletzander mkletzan at redhat.com
Thu Apr 6 09:57:03 UTC 2017


On Thu, Apr 06, 2017 at 11:33:03AM +0200, Andrea Bolognani wrote:
>On Thu, 2017-04-06 at 10:00 +0200, Martin Kletzander wrote:
>> > @@ -8,6 +8,10 @@
>> > # include <stdlib.h>
>>>> > # include "qemu/qemu_capabilities.h"
>> > +# define __QEMU_CAPSPRIV_H_ALLOW__
>> > +# include "qemu/qemu_capspriv.h"
>> > +# undef __QEMU_CAPSPRIV_H_ALLOW__
>> > +
>> 
>> We should, ideally, make some global PRIV_ENABLE macro that would be set
>> in Makefile for all tests.  And all private headers would check that
>> macro.  We wouldn't need to add these in the tests, and it might
>> actually be a bit more future-proof.
>
>I don't necessarily disagree, but I think we have a long
>way ahead before something like that can be implemented.
>
>There are a lot of functions that are exposed to everyone
>just because we want to test them, and I don't think all
>modules have a corresponding private header file. So I'd
>work towards that goal first.
>

I didn't mean to have like a central location for all of them.  Just
have one macro.  Anyway I missed the fact that we need to include them
in the corresponding .c files and that wouldn't work.  So act like I
didn't reply.  The idea in my head sounded really cool, though.

>-- 
>Andrea Bolognani / Red Hat / Virtualization
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170406/9b07b9ee/attachment-0001.sig>


More information about the libvir-list mailing list