[libvirt] virSecurityLabel
Daniel P. Berrange
berrange at redhat.com
Fri Dec 19 09:36:07 UTC 2014
On Thu, Dec 18, 2014 at 09:48:15PM +0100, Claudio Bley wrote:
> At Wed, 17 Dec 2014 09:55:58 +0100,
> Michal Privoznik wrote:
> >
> > On 16.12.2014 23:09, Claudio Bley wrote:
> > > Hi.
> > >
> > > Looking at the API docs, the virSecurityLabel is one of the
> > > undisclosed structs, making its members not publicly available.
> >
> > I don't think it is. It's defined in include/libvirt/libvirt-host.h:
> >
> > typedef struct _virSecurityLabel {
> > char label[VIR_SECURITY_LABEL_BUFLEN];
> > int enforcing;
> > } virSecurityLabel;
> >
> > typedef virSecurityLabel *virSecurityLabelPtr;
> >
> > In fact, the commit that added virDomainGetSecurityLabel() API
> > (0b7860ecdd855251f1) exposed the virSecurityLabel struct too.
>
> Good, but it doesn't show up in the API docs. See
> http://libvirt.org/html/libvirt-libvirt-host.html#virSecurityLabel
> and http://libvirt.org/html/libvirt-libvirt-host.html#virSecurityModel
>
> After some digging around I found out what the problem is. The
> apibuild.py script doesn't like the typedef with the in-line struct
> definition.
Yeah I've hit that and not been able to figure out how to fix the
API parser, so generally just change the struct definition instead.
> Other structs with no field elements in libvirt-api.xml are
>
> virConnect
> virDomain
> virDomainSnapshot
> virInterface
> virNetwork
> virNodeDevice
> virNWFilter
> virSecret
> virStoragePool
> virStorageVol
> virStream
>
> I think these are truly non-public structs, so that should be OK.
None of their fields are shown in the public header files anyway.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list