
On Thu, Mar 02, 2017 at 11:14:26AM -0500, John Ferlan wrote:
Rather than a bunch of embedded union structs, let's create structs for each of the structs within the union and make the struct easier to read.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/node_device_conf.h | 224 ++++++++++++++++++++++++-------------------- 1 file changed, 125 insertions(+), 99 deletions(-)
diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index f05e61b..1107a88 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -103,108 +103,134 @@ typedef enum {
VIR_ENUM_DECL(virNodeDevDRM)
+typedef struct _virNodeDevCapSystemHardware { + char *vendor_name; + char *version; + char *serial; + unsigned char uuid[VIR_UUID_BUFLEN]; +} virNodeDevSystemHardware, *virNodeDevSystemHardwarePtr;
In Libvirt we usually place each typedef on separate line, so this would be: typedef struct _virNodeDevCapSystemHardware virNodeDevSystemHardware; typedef virNodeDevSystemHardware *virNodeDevSystemHardwarePtr; struct _virNodeDevCapSystemHardware { ... }; Pavel