Blob Blame History Raw
From 330e6224d11cbdef798c36ee5244f3b17d95d7cf Mon Sep 17 00:00:00 2001
Message-Id: <330e6224d11cbdef798c36ee5244f3b17d95d7cf@dist-git>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Mon, 10 Sep 2018 15:10:54 +0200
Subject: [PATCH] qemu: Properly report VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT was defined but not used anywhere
in our event generation code. This fixes qemuDomainRevertToSnapshot to
properly report why the domain was resumed.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit 55af06187c48a01192764d8638b85739b0178fe0)

https://bugzilla.redhat.com/show_bug.cgi?id=1634758
https://bugzilla.redhat.com/show_bug.cgi?id=1634759

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f85248e3c7..ec1a43d41d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16323,7 +16323,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
                                                  detail);
             } else if (!was_running) {
                 /* Transition 8 */
-                detail = VIR_DOMAIN_EVENT_RESUMED;
+                detail = VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT;
                 event = virDomainEventLifecycleNewFromObj(vm,
                                                  VIR_DOMAIN_EVENT_RESUMED,
                                                  detail);
-- 
2.19.1