mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
conf: make teaming info an official type
This struct was previously defined only within virDomainNetDef where it was used, but I need to also use it in virDomainHostdevDef, so move the internal struct out to its own "official" struct and give it the standard typedef duo and *Free() function. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
114e3b4232
commit
5d74e2f168
@ -2476,6 +2476,17 @@ virDomainVsockDefFree(virDomainVsockDefPtr vsock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
virDomainNetTeamingInfoFree(virDomainNetTeamingInfoPtr teaming)
|
||||||
|
{
|
||||||
|
if (!teaming)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_free(teaming->persistent);
|
||||||
|
g_free(teaming);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
virDomainNetDefFree(virDomainNetDefPtr def)
|
virDomainNetDefFree(virDomainNetDefPtr def)
|
||||||
{
|
{
|
||||||
|
@ -956,6 +956,11 @@ typedef enum {
|
|||||||
VIR_DOMAIN_NET_TEAMING_TYPE_LAST
|
VIR_DOMAIN_NET_TEAMING_TYPE_LAST
|
||||||
} virDomainNetTeamingType;
|
} virDomainNetTeamingType;
|
||||||
|
|
||||||
|
struct _virDomainNetTeamingInfo {
|
||||||
|
virDomainNetTeamingType type;
|
||||||
|
char *persistent; /* alias name of persistent device */
|
||||||
|
};
|
||||||
|
|
||||||
/* link interface states */
|
/* link interface states */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DEFAULT = 0, /* Default link state (up) */
|
VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DEFAULT = 0, /* Default link state (up) */
|
||||||
@ -1033,10 +1038,7 @@ struct _virDomainNetDef {
|
|||||||
char *tap;
|
char *tap;
|
||||||
char *vhost;
|
char *vhost;
|
||||||
} backend;
|
} backend;
|
||||||
struct {
|
virDomainNetTeamingInfo teaming;
|
||||||
virDomainNetTeamingType type;
|
|
||||||
char *persistent; /* alias name of persistent device */
|
|
||||||
} teaming;
|
|
||||||
union {
|
union {
|
||||||
virDomainChrSourceDefPtr vhostuser;
|
virDomainChrSourceDefPtr vhostuser;
|
||||||
struct {
|
struct {
|
||||||
@ -3100,6 +3102,8 @@ void virDomainActualNetDefFree(virDomainActualNetDefPtr def);
|
|||||||
virDomainVsockDefPtr virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt);
|
virDomainVsockDefPtr virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt);
|
||||||
void virDomainVsockDefFree(virDomainVsockDefPtr vsock);
|
void virDomainVsockDefFree(virDomainVsockDefPtr vsock);
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainVsockDef, virDomainVsockDefFree);
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainVsockDef, virDomainVsockDefFree);
|
||||||
|
void virDomainNetTeamingInfoFree(virDomainNetTeamingInfoPtr teaming);
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainNetTeamingInfo, virDomainNetTeamingInfoFree);
|
||||||
void virDomainNetDefFree(virDomainNetDefPtr def);
|
void virDomainNetDefFree(virDomainNetDefPtr def);
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainNetDef, virDomainNetDefFree);
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainNetDef, virDomainNetDefFree);
|
||||||
void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def);
|
void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def);
|
||||||
|
@ -246,6 +246,9 @@ typedef virDomainNVRAMDef *virDomainNVRAMDefPtr;
|
|||||||
typedef struct _virDomainNetDef virDomainNetDef;
|
typedef struct _virDomainNetDef virDomainNetDef;
|
||||||
typedef virDomainNetDef *virDomainNetDefPtr;
|
typedef virDomainNetDef *virDomainNetDefPtr;
|
||||||
|
|
||||||
|
typedef struct _virDomainNetTeamingInfo virDomainNetTeamingInfo;
|
||||||
|
typedef virDomainNetTeamingInfo *virDomainNetTeamingInfoPtr;
|
||||||
|
|
||||||
typedef struct _virDomainOSDef virDomainOSDef;
|
typedef struct _virDomainOSDef virDomainOSDef;
|
||||||
typedef virDomainOSDef *virDomainOSDefPtr;
|
typedef virDomainOSDef *virDomainOSDefPtr;
|
||||||
|
|
||||||
|
@ -537,6 +537,7 @@ virDomainNetRemove;
|
|||||||
virDomainNetRemoveHostdev;
|
virDomainNetRemoveHostdev;
|
||||||
virDomainNetResolveActualType;
|
virDomainNetResolveActualType;
|
||||||
virDomainNetSetModelString;
|
virDomainNetSetModelString;
|
||||||
|
virDomainNetTeamingInfoFree;
|
||||||
virDomainNetTypeFromString;
|
virDomainNetTypeFromString;
|
||||||
virDomainNetTypeSharesHostView;
|
virDomainNetTypeSharesHostView;
|
||||||
virDomainNetTypeToString;
|
virDomainNetTypeToString;
|
||||||
|
Loading…
Reference in New Issue
Block a user