|
|
9119d9 |
From 30540f7d14552466cf514704cfc91420b0cf81ca Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <30540f7d14552466cf514704cfc91420b0cf81ca@dist-git>
|
|
|
9119d9 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
9119d9 |
Date: Tue, 16 Sep 2014 17:59:38 +0200
|
|
|
9119d9 |
Subject: [PATCH] qemu: time: Report errors if agent command fails
|
|
|
9119d9 |
|
|
|
9119d9 |
Commit b606bbb4 broke reporting of errors when setting of guest time
|
|
|
9119d9 |
fails via the guest agent as the return value is not checked and later
|
|
|
9119d9 |
overwritten by the return value qemuMonitorRTCResetReinjection();
|
|
|
9119d9 |
|
|
|
9119d9 |
Fix this by checking the return value before resetting the RTC
|
|
|
9119d9 |
reinjection.
|
|
|
9119d9 |
|
|
|
9119d9 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1142294
|
|
|
9119d9 |
(cherry picked from commit 98fd3b7f0b1af179336e55ddee6163580a927d93)
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_driver.c | 3 +++
|
|
|
9119d9 |
1 file changed, 3 insertions(+)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
9119d9 |
index a2b9901..48bf612 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_driver.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_driver.c
|
|
|
9119d9 |
@@ -16895,6 +16895,9 @@ qemuDomainSetTime(virDomainPtr dom,
|
|
|
9119d9 |
rv = qemuAgentSetTime(priv->agent, seconds, nseconds, rtcSync);
|
|
|
9119d9 |
qemuDomainObjExitAgent(vm);
|
|
|
9119d9 |
|
|
|
9119d9 |
+ if (rv < 0)
|
|
|
9119d9 |
+ goto endjob;
|
|
|
9119d9 |
+
|
|
|
9119d9 |
if (!virDomainObjIsActive(vm)) {
|
|
|
9119d9 |
virReportError(VIR_ERR_OPERATION_INVALID,
|
|
|
9119d9 |
"%s", _("domain is not running"));
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.0
|
|
|
9119d9 |
|