mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-08 16:54:49 +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
|
#undef MATCH
|
||||||
|
|
||||||
|
|
||||||
struct virInterfaceObjListData {
|
typedef struct _virInterfaceObjListExportData virInterfaceObjListExportData;
|
||||||
|
typedef virInterfaceObjListExportData *virInterfaceObjListExportDataPtr;
|
||||||
|
struct _virInterfaceObjListExportData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virInterfacePtr *ifaces;
|
virInterfacePtr *ifaces;
|
||||||
virInterfaceObjListFilter filter;
|
virInterfaceObjListFilter filter;
|
||||||
@ -274,7 +276,7 @@ virInterfaceObjListPopulate(void *payload,
|
|||||||
const void *name ATTRIBUTE_UNUSED,
|
const void *name ATTRIBUTE_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
struct virInterfaceObjListData *data = opaque;
|
virInterfaceObjListExportDataPtr data = opaque;
|
||||||
virInterfaceObjPtr obj = payload;
|
virInterfaceObjPtr obj = payload;
|
||||||
virInterfacePtr iface = NULL;
|
virInterfacePtr iface = NULL;
|
||||||
|
|
||||||
@ -316,7 +318,7 @@ virInterfaceObjListExport(virConnectPtr conn,
|
|||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct virInterfaceObjListData data = {
|
virInterfaceObjListExportData data = {
|
||||||
.conn = conn, .ifaces = NULL, .filter = filter, .flags = flags,
|
.conn = conn, .ifaces = NULL, .filter = filter, .flags = flags,
|
||||||
.nifaces = 0, .error = false };
|
.nifaces = 0, .error = false };
|
||||||
|
|
||||||
|
@ -1316,7 +1316,9 @@ virNetworkMatch(virNetworkObjPtr obj,
|
|||||||
#undef MATCH
|
#undef MATCH
|
||||||
|
|
||||||
|
|
||||||
struct virNetworkObjListData {
|
typedef struct _virNetworkObjListExportData virNetworkObjListExportData;
|
||||||
|
typedef virNetworkObjListExportData *virNetworkObjListExportDataPtr;
|
||||||
|
struct _virNetworkObjListExportData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virNetworkPtr *nets;
|
virNetworkPtr *nets;
|
||||||
virNetworkObjListFilter filter;
|
virNetworkObjListFilter filter;
|
||||||
@ -1330,7 +1332,7 @@ virNetworkObjListPopulate(void *payload,
|
|||||||
const void *name ATTRIBUTE_UNUSED,
|
const void *name ATTRIBUTE_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
struct virNetworkObjListData *data = opaque;
|
virNetworkObjListExportDataPtr data = opaque;
|
||||||
virNetworkObjPtr obj = payload;
|
virNetworkObjPtr obj = payload;
|
||||||
virNetworkPtr net = NULL;
|
virNetworkPtr net = NULL;
|
||||||
|
|
||||||
@ -1372,7 +1374,7 @@ virNetworkObjListExport(virConnectPtr conn,
|
|||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct virNetworkObjListData data = {
|
virNetworkObjListExportData data = {
|
||||||
.conn = conn, .nets = NULL, .filter = filter, .flags = flags,
|
.conn = conn, .nets = NULL, .filter = filter, .flags = flags,
|
||||||
.nnets = 0, .error = false };
|
.nnets = 0, .error = false };
|
||||||
|
|
||||||
|
@ -838,7 +838,9 @@ virNodeDeviceMatch(virNodeDeviceObjPtr obj,
|
|||||||
#undef MATCH
|
#undef MATCH
|
||||||
|
|
||||||
|
|
||||||
struct virNodeDeviceObjListExportData {
|
typedef struct _virNodeDeviceObjListExportData virNodeDeviceObjListExportData;
|
||||||
|
typedef virNodeDeviceObjListExportData *virNodeDeviceObjListExportDataPtr;
|
||||||
|
struct _virNodeDeviceObjListExportData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virNodeDeviceObjListFilter filter;
|
virNodeDeviceObjListFilter filter;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
@ -854,7 +856,7 @@ virNodeDeviceObjListExportCallback(void *payload,
|
|||||||
{
|
{
|
||||||
virNodeDeviceObjPtr obj = payload;
|
virNodeDeviceObjPtr obj = payload;
|
||||||
virNodeDeviceDefPtr def;
|
virNodeDeviceDefPtr def;
|
||||||
struct virNodeDeviceObjListExportData *data = opaque;
|
virNodeDeviceObjListExportDataPtr data = opaque;
|
||||||
virNodeDevicePtr device = NULL;
|
virNodeDevicePtr device = NULL;
|
||||||
|
|
||||||
if (data->error)
|
if (data->error)
|
||||||
@ -890,7 +892,7 @@ virNodeDeviceObjListExport(virConnectPtr conn,
|
|||||||
virNodeDeviceObjListFilter filter,
|
virNodeDeviceObjListFilter filter,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
struct virNodeDeviceObjListExportData data = {
|
virNodeDeviceObjListExportData data = {
|
||||||
.conn = conn, .filter = filter, .flags = flags,
|
.conn = conn, .filter = filter, .flags = flags,
|
||||||
.devices = NULL, .ndevices = 0, .error = false };
|
.devices = NULL, .ndevices = 0, .error = false };
|
||||||
|
|
||||||
|
@ -526,7 +526,9 @@ virSecretObjMatchFlags(virSecretObjPtr obj,
|
|||||||
#undef MATCH
|
#undef MATCH
|
||||||
|
|
||||||
|
|
||||||
struct virSecretObjListData {
|
typedef struct _virSecretObjListExportData virSecretObjListExportData;
|
||||||
|
typedef virSecretObjListExportData *virSecretObjListExportDataPtr;
|
||||||
|
struct _virSecretObjListExportData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virSecretPtr *secrets;
|
virSecretPtr *secrets;
|
||||||
virSecretObjListACLFilter filter;
|
virSecretObjListACLFilter filter;
|
||||||
@ -540,7 +542,7 @@ virSecretObjListExportCallback(void *payload,
|
|||||||
const void *name ATTRIBUTE_UNUSED,
|
const void *name ATTRIBUTE_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
struct virSecretObjListData *data = opaque;
|
virSecretObjListExportDataPtr data = opaque;
|
||||||
virSecretObjPtr obj = payload;
|
virSecretObjPtr obj = payload;
|
||||||
virSecretDefPtr def;
|
virSecretDefPtr def;
|
||||||
virSecretPtr secret = NULL;
|
virSecretPtr secret = NULL;
|
||||||
@ -584,7 +586,7 @@ virSecretObjListExport(virConnectPtr conn,
|
|||||||
virSecretObjListACLFilter filter,
|
virSecretObjListACLFilter filter,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
struct virSecretObjListData data = {
|
virSecretObjListExportData data = {
|
||||||
.conn = conn, .secrets = NULL,
|
.conn = conn, .secrets = NULL,
|
||||||
.filter = filter, .flags = flags,
|
.filter = filter, .flags = flags,
|
||||||
.nsecrets = 0, .error = false };
|
.nsecrets = 0, .error = false };
|
||||||
|
@ -960,7 +960,9 @@ virStoragePoolObjVolumeGetNames(virStoragePoolObjPtr obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct _virStorageVolObjExportData {
|
typedef struct _virStoragePoolObjVolumeListExportData virStoragePoolObjVolumeListExportData;
|
||||||
|
typedef virStoragePoolObjVolumeListExportData *virStoragePoolObjVolumeListExportDataPtr;
|
||||||
|
struct _virStoragePoolObjVolumeListExportData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virStoragePoolVolumeACLFilter filter;
|
virStoragePoolVolumeACLFilter filter;
|
||||||
virStoragePoolDefPtr pooldef;
|
virStoragePoolDefPtr pooldef;
|
||||||
@ -975,7 +977,7 @@ virStoragePoolObjVolumeListExportCb(void *payload,
|
|||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virStorageVolObjPtr volobj = payload;
|
virStorageVolObjPtr volobj = payload;
|
||||||
struct _virStorageVolObjExportData *data = opaque;
|
virStoragePoolObjVolumeListExportDataPtr data = opaque;
|
||||||
virStorageVolPtr vol = NULL;
|
virStorageVolPtr vol = NULL;
|
||||||
|
|
||||||
if (data->error)
|
if (data->error)
|
||||||
@ -1012,7 +1014,7 @@ virStoragePoolObjVolumeListExport(virConnectPtr conn,
|
|||||||
virStoragePoolVolumeACLFilter filter)
|
virStoragePoolVolumeACLFilter filter)
|
||||||
{
|
{
|
||||||
virStorageVolObjListPtr volumes = obj->volumes;
|
virStorageVolObjListPtr volumes = obj->volumes;
|
||||||
struct _virStorageVolObjExportData data = {
|
virStoragePoolObjVolumeListExportData data = {
|
||||||
.conn = conn, .filter = filter, .pooldef = obj->def, .error = false,
|
.conn = conn, .filter = filter, .pooldef = obj->def, .error = false,
|
||||||
.nvols = 0, .vols = NULL };
|
.nvols = 0, .vols = NULL };
|
||||||
|
|
||||||
@ -1971,7 +1973,9 @@ virStoragePoolMatch(virStoragePoolObjPtr obj,
|
|||||||
#undef MATCH
|
#undef MATCH
|
||||||
|
|
||||||
|
|
||||||
struct _virStoragePoolExportData {
|
typedef struct _virStoragePoolObjListExportData virStoragePoolObjListExportData;
|
||||||
|
typedef virStoragePoolObjListExportData *virStoragePoolObjListExportDataPtr;
|
||||||
|
struct _virStoragePoolObjListExportData {
|
||||||
virConnectPtr conn;
|
virConnectPtr conn;
|
||||||
virStoragePoolObjListACLFilter filter;
|
virStoragePoolObjListACLFilter filter;
|
||||||
bool checkActive;
|
bool checkActive;
|
||||||
@ -1990,7 +1994,7 @@ virStoragePoolObjListExportCb(void *payload,
|
|||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virStoragePoolObjPtr obj = payload;
|
virStoragePoolObjPtr obj = payload;
|
||||||
struct _virStoragePoolExportData *data = opaque;
|
virStoragePoolObjListExportDataPtr data = opaque;
|
||||||
virStoragePoolPtr pool = NULL;
|
virStoragePoolPtr pool = NULL;
|
||||||
|
|
||||||
if (data->error)
|
if (data->error)
|
||||||
@ -2028,7 +2032,7 @@ virStoragePoolObjListExport(virConnectPtr conn,
|
|||||||
virStoragePoolObjListFilter filter,
|
virStoragePoolObjListFilter filter,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
struct _virStoragePoolExportData data = {
|
virStoragePoolObjListExportData data = {
|
||||||
.conn = conn, .filter = filter, .flags = flags, .error = false,
|
.conn = conn, .filter = filter, .flags = flags, .error = false,
|
||||||
.nPools = 0, .pools = NULL };
|
.nPools = 0, .pools = NULL };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user