mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
conf: introduce virDomainVsockDefEquals
Introduce a function for comparing two vsock definitions. https://bugzilla.redhat.com/show_bug.cgi?id=1291851 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
8eaa31c3ad
commit
0b9d4970b4
@ -17592,6 +17592,24 @@ virDomainInputDefFind(const virDomainDef *def,
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
virDomainVsockDefEquals(const virDomainVsockDef *a,
|
||||
const virDomainVsockDef *b)
|
||||
{
|
||||
if (a->model != b->model)
|
||||
return false;
|
||||
|
||||
if (a->auto_cid != b->auto_cid)
|
||||
return false;
|
||||
|
||||
if (a->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
|
||||
!virDomainDeviceInfoAddressIsEqual(&a->info, &b->info))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
virDomainDefGetDefaultEmulator(virDomainDefPtr def,
|
||||
virCapsPtr caps)
|
||||
|
@ -3312,6 +3312,9 @@ virDomainShmemDefPtr virDomainShmemDefRemove(virDomainDefPtr def, size_t idx)
|
||||
ssize_t virDomainInputDefFind(const virDomainDef *def,
|
||||
const virDomainInputDef *input)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
bool virDomainVsockDefEquals(const virDomainVsockDef *a,
|
||||
const virDomainVsockDef *b)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
VIR_ENUM_DECL(virDomainTaint)
|
||||
VIR_ENUM_DECL(virDomainVirt)
|
||||
|
@ -574,6 +574,7 @@ virDomainVideoVGAConfTypeFromString;
|
||||
virDomainVideoVGAConfTypeToString;
|
||||
virDomainVirtTypeFromString;
|
||||
virDomainVirtTypeToString;
|
||||
virDomainVsockDefEquals;
|
||||
virDomainVsockDefFree;
|
||||
virDomainVsockDefNew;
|
||||
virDomainWatchdogActionTypeFromString;
|
||||
|
Loading…
Reference in New Issue
Block a user