Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/domain_conf.c | 10 ++++++++++
src/conf/domain_conf.h | 4 ++++
src/libvirt_private.syms | 1 +
3 files changed, 15 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f8c6b78c92..bae03422ff 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -29052,6 +29052,16 @@ virDomainObjGetState(virDomainObj *dom, int *reason)
}
+bool
+virDomainObjIsFailedPostcopy(virDomainObj *dom)
+{
+ return ((dom->state.state == VIR_DOMAIN_PAUSED &&
+ dom->state.reason == VIR_DOMAIN_PAUSED_POSTCOPY_FAILED) ||
+ (dom->state.state == VIR_DOMAIN_RUNNING &&
+ dom->state.reason == VIR_DOMAIN_RUNNING_POSTCOPY_FAILED));
+}
+
+
void
virDomainObjSetState(virDomainObj *dom, virDomainState state, int reason)
{
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 88a411d00c..2b1f86932f 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3867,6 +3867,10 @@ virDomainState
virDomainObjGetState(virDomainObj *obj, int *reason)
ATTRIBUTE_NONNULL(1);
+bool
+virDomainObjIsFailedPostcopy(virDomainObj *obj)
+ ATTRIBUTE_NONNULL(1);
+
virSecurityLabelDef *
virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 97bfca906b..070551b773 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -579,6 +579,7 @@ virDomainObjGetOneDef;
virDomainObjGetOneDefState;
virDomainObjGetPersistentDef;
virDomainObjGetState;
+virDomainObjIsFailedPostcopy;
virDomainObjNew;
virDomainObjParseFile;
virDomainObjParseNode;
--
2.35.1