Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 2760409763d3c7e1c890a359263d37be > files > 11

libvirt-1.2.9.3-1.5.mga5.src.rpm

Index: libvirt-1.2.9.3/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-1.2.9.3/src/qemu/qemu_capabilities.c
+++ libvirt-1.2.9.3/src/qemu/qemu_capabilities.c	2016-03-03 14:51:59.388583696 +0100
@@ -1325,8 +1325,7 @@
                             unsigned int *version,
                             bool *is_kvm,
                             unsigned int *kvm_version,
-                            bool check_yajl,
-                            const char *qmperr)
+                            bool check_yajl)
 {
     unsigned major, minor, micro;
     const char *p = help;
@@ -1387,15 +1386,9 @@
      * using QMP probing.
      */
     if (*version >= 1002000) {
-        if (qmperr && *qmperr) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("QEMU / QMP failed: %s"),
-                           qmperr);
-        } else {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("QEMU %u.%u.%u is too new for help parsing"),
-                           major, minor, micro);
-        }
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("QEMU %u.%u.%u is too new for help parsing"),
+                       major, minor, micro);
         goto cleanup;
     }
 
@@ -2940,7 +2933,7 @@
 #define QEMU_SYSTEM_PREFIX "qemu-system-"
 
 static int
-virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid, const char *qmperr)
+virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid)
 {
     virCommandPtr cmd = NULL;
     bool is_kvm;
@@ -2971,8 +2964,7 @@
                                 &qemuCaps->version,
                                 &is_kvm,
                                 &qemuCaps->kvmVersion,
-                                false,
-                                qmperr) < 0)
+                                false) < 0)
         goto cleanup;
 
     /* x86_64 and i686 support PCI-multibus on all machine types
@@ -3223,8 +3215,7 @@
 virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
                    const char *libDir,
                    uid_t runUid,
-                   gid_t runGid,
-                   char **qmperr)
+                   gid_t runGid)
 {
     int ret = -1;
     virCommandPtr cmd = NULL;
@@ -3288,16 +3279,13 @@
     virCommandSetPidFile(cmd, pidfile);
     virCommandDaemonize(cmd);
 
-    virCommandSetErrorBuffer(cmd, qmperr);
-
     /* Log, but otherwise ignore, non-zero status.  */
     if (virCommandRun(cmd, &status) < 0)
         goto cleanup;
 
     if (status != 0) {
         ret = 0;
-        VIR_DEBUG("QEMU %s exited with status %d: %s",
-                  qemuCaps->binary, status, *qmperr);
+        VIR_DEBUG("QEMU %s exited with status %d", qemuCaps->binary, status);
         goto cleanup;
     }
 
@@ -3346,8 +3334,6 @@
             VIR_ERROR(_("Failed to kill process %lld: %s"),
                       (long long) pid,
                       virStrerror(errno, ebuf, sizeof(ebuf)));
-
-        VIR_FREE(*qmperr);
     }
     if (pidfile) {
         unlink(pidfile);
@@ -3388,7 +3374,6 @@
     virQEMUCapsPtr qemuCaps;
     struct stat sb;
     int rv;
-    char *qmperr = NULL;
 
     if (!(qemuCaps = virQEMUCapsNew()))
         goto error;
@@ -3419,13 +3404,13 @@
         goto error;
 
     if (rv == 0) {
-        if (virQEMUCapsInitQMP(qemuCaps, libDir, runUid, runGid, &qmperr) < 0) {
+        if (virQEMUCapsInitQMP(qemuCaps, libDir, runUid, runGid) < 0) {
             virQEMUCapsLogProbeFailure(binary);
             goto error;
         }
 
         if (!qemuCaps->usedQMP &&
-            virQEMUCapsInitHelp(qemuCaps, runUid, runGid, qmperr) < 0) {
+            virQEMUCapsInitHelp(qemuCaps, runUid, runGid) < 0) {
             virQEMUCapsLogProbeFailure(binary);
             goto error;
         }
@@ -3434,11 +3419,9 @@
             goto error;
     }
 
-    VIR_FREE(qmperr);
     return qemuCaps;
 
  error:
-    VIR_FREE(qmperr);
     virObjectUnref(qemuCaps);
     qemuCaps = NULL;
     return NULL;
Index: libvirt-1.2.9.3/src/qemu/qemu_capabilities.h
===================================================================
--- libvirt-1.2.9.3/src/qemu/qemu_capabilities.h
+++ libvirt-1.2.9.3/src/qemu/qemu_capabilities.h	2016-03-03 14:52:09.012630086 +0100
@@ -302,8 +302,7 @@
                             unsigned int *version,
                             bool *is_kvm,
                             unsigned int *kvm_version,
-                            bool check_yajl,
-                            const char *qmperr);
+                            bool check_yajl);
 /* Only for use by test suite */
 int virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str);
 
Index: libvirt-1.2.9.3/tests/qemuhelptest.c
===================================================================
--- libvirt-1.2.9.3/tests/qemuhelptest.c
+++ libvirt-1.2.9.3/tests/qemuhelptest.c	2016-03-03 14:52:10.508637299 +0100
@@ -59,7 +59,7 @@
         goto cleanup;
 
     if (virQEMUCapsParseHelpStr("QEMU", help, flags,
-                                &version, &is_kvm, &kvm_version, false, NULL) == -1) {
+                                &version, &is_kvm, &kvm_version, false) == -1) {
         if (info->error && virGetLastError()->code == info->error)
             ret = 0;
         goto cleanup;