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.
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.
Patch coming up.
--
Claudio