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

Re: [libvirt] PATCH [0/2]: Deprecate conn, dom, net virterror fields

Hi, Rich

Your code seems to make compilation trouble.


Atsushi SAKAI

"Richard W.M. Jones" <rjones redhat com> wrote:

> This is a pair of patches which deprecate the conn, dom and net fields
> in the virterror structure.
> Programs which use these fields will get a warning (if compiled under
> gcc anyway):
>   foo.c:123: warning: 'dom' is deprecated (declared at /usr/include/libvirt/virterror.h:81)
> The fields themselves are still present and still set, so the ABI
> isn't changed.
> Now the patch is quite a lot more involved than you might think for
> such a simple change.  Part of the problem is that we want to allow
> libvirt itself to modify these fields without generating a warning.
> Therefore the first part of the patch has to refactor all code within
> libvirt which includes "libvirt.h" or "virterror.h" (the public
> headers) so that instead this code just includes "internal.h".
> "internal.h" already includes the public headers.  This allows
> "internal.h" to undefine the deprecation macro.
> Of course nothing is quite so simple.  We have two "internal.h" files,
> so I renamed the one in the qemud directory to "qemud.h".
> I also added something in the HACKING file, stating how *.c files
> within libvirt should include header files.
> The second part of the patch actually adds the deprecation to the
> fields in virterror, and hence is small and simple.
> Rich.
> -- 
> Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
> virt-p2v converts physical machines to virtual machines.  Boot with a
> live CD or over the network (PXE) and turn machines into Xen guests.
> http://et.redhat.com/~rjones/virt-p2v
> --
> Libvir-list mailing list
> Libvir-list redhat com
> https://www.redhat.com/mailman/listinfo/libvir-list

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