mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
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> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
d8826129fd
commit
5efc8d0caa
@ -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 };
|
||||
|
||||
|
@ -1316,7 +1316,9 @@ virNetworkMatch(virNetworkObjPtr obj,
|
||||
#undef MATCH
|
||||
|
||||
|
||||
struct virNetworkObjListData {
|
||||
typedef struct _virNetworkObjListExportData virNetworkObjListExportData;
|
||||
typedef virNetworkObjListExportData *virNetworkObjListExportDataPtr;
|
||||
struct _virNetworkObjListExportData {
|
||||
virConnectPtr conn;
|
||||
virNetworkPtr *nets;
|
||||
virNetworkObjListFilter filter;
|
||||
@ -1330,7 +1332,7 @@ virNetworkObjListPopulate(void *payload,
|
||||
const void *name ATTRIBUTE_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
struct virNetworkObjListData *data = opaque;
|
||||
virNetworkObjListExportDataPtr data = opaque;
|
||||
virNetworkObjPtr obj = payload;
|
||||
virNetworkPtr net = NULL;
|
||||
|
||||
@ -1372,7 +1374,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 };
|
||||
|
||||
|
@ -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 };
|
||||
|
||||
|
@ -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 };
|
||||
|
@ -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 };
|
||||
|
||||
@ -1971,7 +1973,9 @@ virStoragePoolMatch(virStoragePoolObjPtr obj,
|
||||
#undef MATCH
|
||||
|
||||
|
||||
struct _virStoragePoolExportData {
|
||||
typedef struct _virStoragePoolObjListExportData virStoragePoolObjListExportData;
|
||||
typedef virStoragePoolObjListExportData *virStoragePoolObjListExportDataPtr;
|
||||
struct _virStoragePoolObjListExportData {
|
||||
virConnectPtr conn;
|
||||
virStoragePoolObjListACLFilter filter;
|
||||
bool checkActive;
|
||||
@ -1990,7 +1994,7 @@ virStoragePoolObjListExportCb(void *payload,
|
||||
void *opaque)
|
||||
{
|
||||
virStoragePoolObjPtr obj = payload;
|
||||
struct _virStoragePoolExportData *data = opaque;
|
||||
virStoragePoolObjListExportDataPtr data = opaque;
|
||||
virStoragePoolPtr pool = NULL;
|
||||
|
||||
if (data->error)
|
||||
@ -2028,7 +2032,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 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user