On some architectures, QEMU exposes additional information on certain
domain states, e.g. for guest crashes. Let's add a field @info to the
virDomainStateReason struct inside virDomainObj which holds additional
state information.
One drawback is that this information is not serialized and is lost in
case of a daemon restart.
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Signed-off-by: Bjoern Walk <bwalk(a)linux.ibm.com>
---
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7396616e..805da60d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3182,6 +3182,7 @@ static void virDomainObjDispose(void *obj)
VIR_DEBUG("obj=%p", dom);
virCondDestroy(&dom->cond);
+ VIR_FREE(dom->state.info);
virDomainDefFree(dom->def);
virDomainDefFree(dom->newDef);
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 0f10e242..d4fd676f 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2578,6 +2578,7 @@ typedef struct _virDomainStateReason virDomainStateReason;
struct _virDomainStateReason {
int state;
int reason;
+ char *info;
};
typedef struct _virDomainObj virDomainObj;
--
2.17.0