render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c401cc
From 6d54c23a5c6e1c893debe9324d14fe0c00ef755c Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <6d54c23a5c6e1c893debe9324d14fe0c00ef755c.1386932212.git.jdenemar@redhat.com>
c401cc
From: "Daniel P. Berrange" <berrange@redhat.com>
c401cc
Date: Fri, 17 Dec 2010 14:55:35 +0100
c401cc
Subject: [PATCH] Switch to private redhat namespace for QMP I/O error reason
c401cc
c401cc
RHEL only, no upstream
c401cc
c401cc
For
c401cc
  https://bugzilla.redhat.com/show_bug.cgi?id=1026966
c401cc
  https://bugzilla.redhat.com/show_bug.cgi?id=586353
c401cc
c401cc
The I/O error reason support is not yet available in QEMU, so RHEL6
c401cc
is using the redhat private namespace for it
c401cc
c401cc
* src/qemu/qemu_monitor_json.c: Replace 'reason' with '__com.redhat_reason'
c401cc
c401cc
(cherry picked from commit 369186c3f1555fa66b084bdf1f1d3f21f041256d in
c401cc
rhel-6.5 branch)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 src/qemu/qemu_monitor_json.c | 8 ++------
c401cc
 1 file changed, 2 insertions(+), 6 deletions(-)
c401cc
c401cc
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
c401cc
index def3296..18497e3 100644
c401cc
--- a/src/qemu/qemu_monitor_json.c
c401cc
+++ b/src/qemu/qemu_monitor_json.c
c401cc
@@ -655,14 +655,10 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
c401cc
         VIR_WARN("missing device in disk io error event");
c401cc
     }
c401cc
 
c401cc
-#if 0
c401cc
-    if ((reason = virJSONValueObjectGetString(data, "reason")) == NULL) {
c401cc
-        VIR_WARN("missing reason in disk io error event");
c401cc
+    if ((reason = virJSONValueObjectGetString(data, "__com.redhat_reason")) == NULL) {
c401cc
+        VIR_WARN("missing __com.redhat_reason in disk io error event");
c401cc
         reason = "";
c401cc
     }
c401cc
-#else
c401cc
-    reason = "";
c401cc
-#endif
c401cc
 
c401cc
     if ((actionID = qemuMonitorIOErrorActionTypeFromString(action)) < 0) {
c401cc
         VIR_WARN("unknown disk io error action '%s'", action);
c401cc
-- 
c401cc
1.8.5.1
c401cc