Blob Blame History Raw
From 8d2d15ec73393f360a1bf7b88ee2cb491efad037 Mon Sep 17 00:00:00 2001
Message-Id: <8d2d15ec73393f360a1bf7b88ee2cb491efad037@dist-git>
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Fri, 17 Dec 2010 14:55:35 +0100
Subject: [PATCH] RHEL: Switch to private redhat namespace for QMP I/O error
 reason

RHEL only, no upstream

For
  https://bugzilla.redhat.com/show_bug.cgi?id=1026966
  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'

(cherry picked from commit 369186c3f1555fa66b084bdf1f1d3f21f041256d in
rhel-6.5 branch)

Signed-off-by: Jiri Denemark <jdenemar@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 6e8834f..e88068c 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -737,14 +737,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);
-- 
2.1.0