mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
util: add API for copying virtual port profile data
Reviewed-by: Laine Stump <laine@laine.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
4bdce1219f
commit
80772a58b6
@ -2510,6 +2510,7 @@ virNetDevVlanFree;
|
|||||||
virNetDevVPortProfileAssociate;
|
virNetDevVPortProfileAssociate;
|
||||||
virNetDevVPortProfileCheckComplete;
|
virNetDevVPortProfileCheckComplete;
|
||||||
virNetDevVPortProfileCheckNoExtras;
|
virNetDevVPortProfileCheckNoExtras;
|
||||||
|
virNetDevVPortProfileCopy;
|
||||||
virNetDevVPortProfileDisassociate;
|
virNetDevVPortProfileDisassociate;
|
||||||
virNetDevVPortProfileEqual;
|
virNetDevVPortProfileEqual;
|
||||||
virNetDevVPortProfileMerge3;
|
virNetDevVPortProfileMerge3;
|
||||||
|
@ -127,6 +127,22 @@ virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a, virNetDevVPortProfilePtr
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int virNetDevVPortProfileCopy(virNetDevVPortProfilePtr *dst, const virNetDevVPortProfile *src)
|
||||||
|
{
|
||||||
|
if (!src) {
|
||||||
|
*dst = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (VIR_ALLOC(*dst) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
memcpy(*dst, src, sizeof(*src));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* virNetDevVPortProfileCheckComplete() checks that all attributes
|
/* virNetDevVPortProfileCheckComplete() checks that all attributes
|
||||||
* required for the type of virtport are specified. When
|
* required for the type of virtport are specified. When
|
||||||
* generateMissing is true, any missing attribute that can be
|
* generateMissing is true, any missing attribute that can be
|
||||||
|
@ -80,6 +80,8 @@ struct _virNetDevVPortProfile {
|
|||||||
|
|
||||||
bool virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a,
|
bool virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a,
|
||||||
virNetDevVPortProfilePtr b);
|
virNetDevVPortProfilePtr b);
|
||||||
|
int virNetDevVPortProfileCopy(virNetDevVPortProfilePtr *dst,
|
||||||
|
const virNetDevVPortProfile *src);
|
||||||
|
|
||||||
int virNetDevVPortProfileCheckComplete(virNetDevVPortProfilePtr virtport,
|
int virNetDevVPortProfileCheckComplete(virNetDevVPortProfilePtr virtport,
|
||||||
bool generateMissing);
|
bool generateMissing);
|
||||||
|
Loading…
Reference in New Issue
Block a user