On 03/03/2017 04:20 AM, Pavel Hrdina wrote: > 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@xxxxxxxxxx> >> --- >> 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 > I had it that way originally, but changed it because of: typedef struct _virNodeDevCapData { ... } virNodeDevCapData, *virNodeDevCapDataPtr; to be consistent to the module. IDC either way. I'll adjust the new defs though John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list