[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 1/3] conf: rename structs used by Export function



name structs to be the name of the Export function followed by Data
also tweak definitions to follow standard struct definition pattern

    ex. for virInterfaceObjListExport, the struct is defined as follows:

        typedef struct _virInterfaceObjListExportData virInterfaceObjListExportData;
        typedef virInterfaceObjListExportData *virInterfaceObjListExportDataPtr;
        struct _virInterfaceObjListExportData {...};

Signed-off-by: Anya Harter <aharter redhat com>
---
 src/conf/virinterfaceobj.c  |  8 +++++---
 src/conf/virnetworkobj.c    |  8 +++++---
 src/conf/virnodedeviceobj.c |  8 +++++---
 src/conf/virsecretobj.c     |  8 +++++---
 src/conf/virstorageobj.c    | 16 ++++++++++------
 5 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c
index b0c4ca15a1..0fe0042920 100644
--- a/src/conf/virinterfaceobj.c
+++ b/src/conf/virinterfaceobj.c
@@ -260,7 +260,9 @@ virInterfaceObjMatch(virInterfaceObjPtr obj,
 #undef MATCH
 
 
-struct virInterfaceObjListData {
+typedef struct _virInterfaceObjListExportData virInterfaceObjListExportData;
+typedef virInterfaceObjListExportData *virInterfaceObjListExportDataPtr;
+struct _virInterfaceObjListExportData {
     virConnectPtr conn;
     virInterfacePtr *ifaces;
     virInterfaceObjListFilter filter;
@@ -274,7 +276,7 @@ virInterfaceObjListPopulate(void *payload,
                             const void *name ATTRIBUTE_UNUSED,
                             void *opaque)
 {
-    struct virInterfaceObjListData *data = opaque;
+    virInterfaceObjListExportDataPtr data = opaque;
     virInterfaceObjPtr obj = payload;
     virInterfacePtr iface = NULL;
 
@@ -316,7 +318,7 @@ virInterfaceObjListExport(virConnectPtr conn,
                           unsigned int flags)
 {
     int ret = -1;
-    struct virInterfaceObjListData data = {
+    virInterfaceObjListExportData data = {
         .conn = conn, .ifaces = NULL, .filter = filter, .flags = flags,
         .nifaces = 0, .error = false };
 
diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index e00c8a7f6c..f69ee0c2fa 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -1304,7 +1304,9 @@ virNetworkMatch(virNetworkObjPtr obj,
 #undef MATCH
 
 
-struct virNetworkObjListData {
+typedef struct _virNetworkObjListExportData virNetworkObjListExportData;
+typedef virNetworkObjListExportData *virNetworkObjListExportDataPtr;
+struct _virNetworkObjListExportData {
     virConnectPtr conn;
     virNetworkPtr *nets;
     virNetworkObjListFilter filter;
@@ -1318,7 +1320,7 @@ virNetworkObjListPopulate(void *payload,
                           const void *name ATTRIBUTE_UNUSED,
                           void *opaque)
 {
-    struct virNetworkObjListData *data = opaque;
+    virNetworkObjListExportDataPtr data = opaque;
     virNetworkObjPtr obj = payload;
     virNetworkPtr net = NULL;
 
@@ -1360,7 +1362,7 @@ virNetworkObjListExport(virConnectPtr conn,
                         unsigned int flags)
 {
     int ret = -1;
-    struct virNetworkObjListData data = {
+    virNetworkObjListExportData data = {
         .conn = conn, .nets = NULL, .filter = filter, .flags = flags,
         .nnets = 0, .error = false };
 
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index 6c04caf6ab..2c660a080a 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -838,7 +838,9 @@ virNodeDeviceMatch(virNodeDeviceObjPtr obj,
 #undef MATCH
 
 
-struct virNodeDeviceObjListExportData {
+typedef struct _virNodeDeviceObjListExportData virNodeDeviceObjListExportData;
+typedef virNodeDeviceObjListExportData *virNodeDeviceObjListExportDataPtr;
+struct _virNodeDeviceObjListExportData {
     virConnectPtr conn;
     virNodeDeviceObjListFilter filter;
     unsigned int flags;
@@ -854,7 +856,7 @@ virNodeDeviceObjListExportCallback(void *payload,
 {
     virNodeDeviceObjPtr obj = payload;
     virNodeDeviceDefPtr def;
-    struct virNodeDeviceObjListExportData *data = opaque;
+    virNodeDeviceObjListExportDataPtr data = opaque;
     virNodeDevicePtr device = NULL;
 
     if (data->error)
@@ -890,7 +892,7 @@ virNodeDeviceObjListExport(virConnectPtr conn,
                            virNodeDeviceObjListFilter filter,
                            unsigned int flags)
 {
-    struct virNodeDeviceObjListExportData data = {
+    virNodeDeviceObjListExportData data = {
         .conn = conn, .filter = filter, .flags = flags,
         .devices = NULL, .ndevices = 0, .error = false };
 
diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c
index 48ce3c8141..c80cf364c6 100644
--- a/src/conf/virsecretobj.c
+++ b/src/conf/virsecretobj.c
@@ -526,7 +526,9 @@ virSecretObjMatchFlags(virSecretObjPtr obj,
 #undef MATCH
 
 
-struct virSecretObjListData {
+typedef struct _virSecretObjListExportData virSecretObjListExportData;
+typedef virSecretObjListExportData *virSecretObjListExportDataPtr;
+struct _virSecretObjListExportData {
     virConnectPtr conn;
     virSecretPtr *secrets;
     virSecretObjListACLFilter filter;
@@ -540,7 +542,7 @@ virSecretObjListExportCallback(void *payload,
                                const void *name ATTRIBUTE_UNUSED,
                                void *opaque)
 {
-    struct virSecretObjListData *data = opaque;
+    virSecretObjListExportDataPtr data = opaque;
     virSecretObjPtr obj = payload;
     virSecretDefPtr def;
     virSecretPtr secret = NULL;
@@ -584,7 +586,7 @@ virSecretObjListExport(virConnectPtr conn,
                        virSecretObjListACLFilter filter,
                        unsigned int flags)
 {
-    struct virSecretObjListData data = {
+    virSecretObjListExportData data = {
         .conn = conn, .secrets = NULL,
         .filter = filter, .flags = flags,
         .nsecrets = 0, .error = false };
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index e66b2ebfb2..0964088fda 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -960,7 +960,9 @@ virStoragePoolObjVolumeGetNames(virStoragePoolObjPtr obj,
 }
 
 
-struct _virStorageVolObjExportData {
+typedef struct _virStoragePoolObjVolumeListExportData virStoragePoolObjVolumeListExportData;
+typedef virStoragePoolObjVolumeListExportData *virStoragePoolObjVolumeListExportDataPtr;
+struct _virStoragePoolObjVolumeListExportData {
     virConnectPtr conn;
     virStoragePoolVolumeACLFilter filter;
     virStoragePoolDefPtr pooldef;
@@ -975,7 +977,7 @@ virStoragePoolObjVolumeListExportCb(void *payload,
                                     void *opaque)
 {
     virStorageVolObjPtr volobj = payload;
-    struct _virStorageVolObjExportData *data = opaque;
+    virStoragePoolObjVolumeListExportDataPtr data = opaque;
     virStorageVolPtr vol = NULL;
 
     if (data->error)
@@ -1012,7 +1014,7 @@ virStoragePoolObjVolumeListExport(virConnectPtr conn,
                                   virStoragePoolVolumeACLFilter filter)
 {
     virStorageVolObjListPtr volumes = obj->volumes;
-    struct _virStorageVolObjExportData data = {
+    virStoragePoolObjVolumeListExportData data = {
         .conn = conn, .filter = filter, .pooldef = obj->def, .error = false,
         .nvols = 0, .vols = NULL };
 
@@ -1969,7 +1971,9 @@ virStoragePoolMatch(virStoragePoolObjPtr obj,
 #undef MATCH
 
 
-struct _virStoragePoolExportData {
+typedef struct _virStoragePoolObjListExportData virStoragePoolObjListExportData;
+typedef virStoragePoolObjListExportData *virStoragePoolObjListExportDataPtr;
+struct _virStoragePoolObjListExportData {
     virConnectPtr conn;
     virStoragePoolObjListACLFilter filter;
     bool checkActive;
@@ -1988,7 +1992,7 @@ virStoragePoolObjListExportCb(void *payload,
                               void *opaque)
 {
     virStoragePoolObjPtr obj = payload;
-    struct _virStoragePoolExportData *data = opaque;
+    virStoragePoolObjListExportDataPtr data = opaque;
     virStoragePoolPtr pool = NULL;
 
     if (data->error)
@@ -2026,7 +2030,7 @@ virStoragePoolObjListExport(virConnectPtr conn,
                             virStoragePoolObjListFilter filter,
                             unsigned int flags)
 {
-    struct _virStoragePoolExportData data = {
+    virStoragePoolObjListExportData data = {
         .conn = conn, .filter = filter, .flags = flags, .error = false,
         .nPools = 0, .pools = NULL };
 
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]