From f55572ca0189cd5130fb7d1e7da32a16d2ecf64d Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Thu, 18 Dec 2014 21:50:20 +0100 Subject: [PATCH] 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. --- include/libvirt/libvirt-host.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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: -- 2.47.3