[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.7.5-4-2-gf6e41ae

Guido Günther agx at sigxcpu.org
Mon Jan 18 20:23:15 UTC 2010


The following commit has been merged in the master branch:
commit f6e41aeabdeec3b9adc94491bc9f13a5ee779369
Author: Guido Günther <agx at sigxcpu.org>
Date:   Mon Jan 18 21:06:03 2010 +0100

    New patch 0008-qemu-Use-log-output-for-pty-assignment-if-info-chard.patch
    
    qemu: Use log output for pty assignment if 'info chardev' is unavailable
    Thanks: Matthias Bolte

diff --git a/debian/patches/0008-qemu-Use-log-output-for-pty-assignment-if-info-chard.patch b/debian/patches/0008-qemu-Use-log-output-for-pty-assignment-if-info-chard.patch
new file mode 100644
index 0000000..1cfdd4f
--- /dev/null
+++ b/debian/patches/0008-qemu-Use-log-output-for-pty-assignment-if-info-chard.patch
@@ -0,0 +1,43 @@
+From: Matthias Bolte <matthias.bolte at googlemail.com>
+Date: Mon, 18 Jan 2010 21:04:50 +0100
+Subject: [PATCH] qemu: Use log output for pty assignment if 'info chardev' is unavailable
+
+qemudFindCharDevicePTYsMonitor reports an error if 'info chardev' didn't
+provide information for a requested device, even if the log output parsing
+had found the pty path for that device. This makes pty assignment fail for
+older QEMU/KVM versions. For example KVM 72 on Debian doesn't support
+'info chardev', so qemuMonitorTextGetPtyPaths cannot parse any useful
+information and the hash for device-id-to-pty-path mapping stays empty.
+
+Make qemudFindCharDevicePTYsMonitor report an error only if the log output
+parsing and the 'info chardev' parsing failed to provide the pty path.
+---
+ src/qemu/qemu_driver.c |   14 +++++++++++---
+ 1 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
+index 7dfa78f..9e44b46 100644
+--- a/src/qemu/qemu_driver.c
++++ b/src/qemu/qemu_driver.c
+@@ -1428,9 +1428,17 @@ qemudFindCharDevicePTYsMonitor(virConnectPtr conn,
+                                                                           \
+             const char *path = (const char *) virHashLookup(paths, id);   \
+             if (path == NULL) {                                           \
+-                qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,\
+-                                 _("no assigned pty for device %s"), id); \
+-                return -1;                                                \
++                if (chr->data.file.path == NULL) {                        \
++                    /* neither the log output nor 'info chardev' had a */ \
++                    /* pty path for this chardev, report an error */      \
++                    qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, \
++                                     _("no assigned pty for device %s"), id);  \
++                    return -1;                                                 \
++                } else {                                                  \
++                    /* 'info chardev' had no pty path for this chardev, */\
++                    /* but the log output had, so we're fine */           \
++                    continue;                                             \
++                }                                                         \
+             }                                                             \
+                                                                           \
+             chr->data.file.path = strdup(path);                           \
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 54150d1..1f1ef30 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-Also-look-for-dmi-information-in-sys-class.patch
 0006-Terminate-nc-on-EOF.patch
 0007-Implement-path-lookup-for-USB-by-vendor-product.patch
+0008-qemu-Use-log-output-for-pty-assignment-if-info-chard.patch

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list