Signed-off-by: Luke Yue <lukedyue(a)gmail.com>
---
src/conf/domain_conf.c | 24 ++++++++++++++++++++++++
src/conf/domain_conf.h | 4 ++++
src/libvirt_private.syms | 1 +
3 files changed, 29 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7f3d207a3e..62bb6669e8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -16857,6 +16857,30 @@ virDomainTPMDefRemove(virDomainDef *def,
}
+bool
+virDomainMemballoonDefEquals(const virDomainMemballoonDef *a,
+ const virDomainMemballoonDef *b)
+{
+ if (a->model != b->model)
+ return false;
+
+ if (a->period != b->period)
+ return false;
+
+ if (a->autodeflate != b->autodeflate)
+ return false;
+
+ if (a->free_page_reporting != b->free_page_reporting)
+ return false;
+
+ if (a->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
+ !virDomainDeviceInfoAddressIsEqual(&a->info, &b->info))
+ return false;
+
+ return true;
+}
+
+
char *
virDomainDefGetDefaultEmulator(virDomainDef *def,
virCaps *caps)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b8a1e1d2d2..a18992677b 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3827,6 +3827,10 @@ ssize_t virDomainTPMDefFind(const virDomainDef *def,
virDomainTPMDef *virDomainTPMDefRemove(virDomainDef *def, size_t idx)
ATTRIBUTE_NONNULL(1);
+bool virDomainMemballoonDefEquals(const virDomainMemballoonDef *a,
+ const virDomainMemballoonDef *b)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
+
VIR_ENUM_DECL(virDomainTaint);
VIR_ENUM_DECL(virDomainTaintMessage);
VIR_ENUM_DECL(virDomainVirt);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 349cce2f00..57f0d24c36 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -504,6 +504,7 @@ virDomainLoaderTypeFromString;
virDomainLoaderTypeToString;
virDomainLockFailureTypeFromString;
virDomainLockFailureTypeToString;
+virDomainMemballoonDefEquals;
virDomainMemballoonModelTypeFromString;
virDomainMemballoonModelTypeToString;
virDomainMemoryDefFree;
--
2.33.0