From: Pavel Rochnyack Date: Mon, 13 May 2019 08:13:50 +0000 (+0700) Subject: virt plugin: Added support for new shutdown event details X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9815a4ed680871671c58d791b70a57c4b9866783;p=collectd.git virt plugin: Added support for new shutdown event details --- diff --git a/src/virt.c b/src/virt.c index 3d5a6ef2..1fa47276 100644 --- a/src/virt.c +++ b/src/virt.c @@ -303,6 +303,16 @@ static int map_domain_event_detail_to_reason(int event, int detail) { switch (detail) { case VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED: /* Guest finished shutdown sequence */ +#ifdef LIBVIR_CHECK_VERSION +#if LIBVIR_CHECK_VERSION(3, 4, 0) + case VIR_DOMAIN_EVENT_SHUTDOWN_GUEST: /* Domain finished shutting down after + request from the guest itself (e.g. + hardware-specific action) */ + case VIR_DOMAIN_EVENT_SHUTDOWN_HOST: /* Domain finished shutting down after + request from the host (e.g. killed + by a signal) */ +#endif +#endif ret = VIR_DOMAIN_SHUTDOWN_USER; break; default: