From: Pavel Rochnyack Date: Sun, 12 May 2019 18:43:57 +0000 (+0700) Subject: virt plugin: Added new code of virDomainShutoffReason enum X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4d36eb7419a5857313cf2e2854d2b56975f9d4a4;p=collectd.git virt plugin: Added new code of virDomainShutoffReason enum --- diff --git a/src/virt.c b/src/virt.c index 9d368af6..3d5a6ef2 100644 --- a/src/virt.c +++ b/src/virt.c @@ -107,6 +107,9 @@ #define HAVE_DOM_REASON_POSTCOPY 1 #endif +#if LIBVIR_CHECK_VERSION(4, 10, 0) +#define HAVE_DOM_REASON_SHUTOFF_DAEMON 1 +#endif #endif /* LIBVIR_CHECK_VERSION */ /* structure used for aggregating notification-thread data*/ @@ -425,6 +428,10 @@ const char *domain_reasons[][DOMAIN_STATE_REASON_MAX_SIZE] = { "domain failed to start", [VIR_DOMAIN_SHUTOFF][VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT] = "restored from a snapshot which was taken while domain was shutoff", +#ifdef HAVE_DOM_REASON_SHUTOFF_DAEMON + [VIR_DOMAIN_SHUTOFF][VIR_DOMAIN_SHUTOFF_DAEMON] = + "daemon decides to kill domain during reconnection processing", +#endif [VIR_DOMAIN_CRASHED][VIR_DOMAIN_CRASHED_UNKNOWN] = "the reason is unknown",