From: Claudio Bley Date: Thu, 18 Dec 2014 20:50:20 +0000 (+0100) Subject: docs: split typedef and struct definition for apibuild.py X-Git-Tag: v1.2.12-rc1~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f55572ca0189cd5130fb7d1e7da32a16d2ecf64d;p=thirdparty%2Flibvirt.git docs: split typedef and struct definition for apibuild.py The members of struct virSecurityLabel and struct virSecurityModel were not shown in the libvirt API docs because the corresponding elements were missing from the libvirt-api.xml. The reason is that apibuild.py does not cope well with typedef's using inline struct definitions. It fails to associate the comment with the typedef and because of this refuses to write out the field of the struct. --- diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 53b529f214..0704672c9c 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -108,12 +108,13 @@ typedef virStream *virStreamPtr; * a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(), * providing the security label and associated attributes for the specified * domain. - * */ -typedef struct _virSecurityLabel { +typedef struct _virSecurityLabel virSecurityLabel; + +struct _virSecurityLabel { char label[VIR_SECURITY_LABEL_BUFLEN]; /* security label string */ int enforcing; /* 1 if security policy is being enforced for domain */ -} virSecurityLabel; +}; /** * virSecurityLabelPtr: @@ -142,12 +143,13 @@ typedef virSecurityLabel *virSecurityLabelPtr; * a virSecurityModel is a structure filled by virNodeGetSecurityModel(), * providing the per-hypervisor security model and DOI attributes for the * specified domain. - * */ -typedef struct _virSecurityModel { +typedef struct _virSecurityModel virSecurityModel; + +struct _virSecurityModel { char model[VIR_SECURITY_MODEL_BUFLEN]; /* security model string */ char doi[VIR_SECURITY_DOI_BUFLEN]; /* domain of interpetation */ -} virSecurityModel; +}; /** * virSecurityModelPtr: