From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: libvirt <libvir-list@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Eric Blake <eblake@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0
Date: Fri, 02 Dec 2011 15:08:23 -0500 [thread overview]
Message-ID: <4ED93037.7070902@linux.vnet.ibm.com> (raw)
Qemu 1.0 does not show a micro version like 0.15.50 did. Adapt the
Qemu version parser to handle this.
---
src/qemu/qemu_capabilities.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
Index: libvirt-tpm/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-tpm.orig/src/qemu/qemu_capabilities.c
+++ libvirt-tpm/src/qemu/qemu_capabilities.c
@@ -1147,15 +1147,24 @@ int qemuCapsParseHelpStr(const char *qem
++p;
minor = virParseNumber(&p);
- if (minor == -1 || *p != '.')
+ if (minor == -1)
goto fail;
+ if (major == 0 && *p != '.')
+ goto fail;
+
+ if (major > 0 && *p != '.') {
+ micro = 0;
+ goto skip_micro;
+ }
+
++p;
micro = virParseNumber(&p);
if (micro == -1)
goto fail;
+skip_micro:
SKIP_BLANKS(p);
if (STRPREFIX(p, QEMU_KVM_VER_PREFIX)) {
next reply other threads:[~2011-12-02 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 20:08 Stefan Berger [this message]
2011-12-02 20:32 ` [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0 Eric Blake
2011-12-02 20:52 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ED93037.7070902@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=eblake@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.