File libvirt-Switch-to-private-redhat-namespace-for-QMP-I-O-error-reason.patch of Package libvirt

From 369186c3f1555fa66b084bdf1f1d3f21f041256d Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Fri, 17 Dec 2010 14:55:35 +0100
Subject: [PATCH] Switch to private redhat namespace for QMP I/O error reason
To: libvir-list@redhat.com

RHEL-6 only, no upstream

For

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

The I/O error reason support is not yet available in QEMU, so RHEL6
is using the redhat private namespace for it

* src/qemu/qemu_monitor_json.c: Replace 'reason' with '__com.redhat_reason'

Signed-off-by: Daniel Veillard <veillard@redhat.com>
---
 src/qemu/qemu_monitor_json.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e266534..cfd7982 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -644,14 +644,10 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
         VIR_WARN("missing device in disk io error event");
     }
 
-#if 0
-    if ((reason = virJSONValueObjectGetString(data, "reason")) == NULL) {
-        VIR_WARN("missing reason in disk io error event");
+    if ((reason = virJSONValueObjectGetString(data, "__com.redhat_reason")) == NULL) {
+        VIR_WARN("missing __com.redhat_reason in disk io error event");
         reason = "";
     }
-#else
-    reason = "";
-#endif
 
     if ((actionID = qemuMonitorIOErrorActionTypeFromString(action)) < 0) {
         VIR_WARN("unknown disk io error action '%s'", action);
-- 
1.7.11.4

openSUSE Build Service is sponsored by