qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0
@ 2011-12-02 20:08 Stefan Berger
  2011-12-02 20:32 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Berger @ 2011-12-02 20:08 UTC (permalink / raw)
  To: libvirt; +Cc: Anthony Liguori, Eric Blake, qemu-devel

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)) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0
  2011-12-02 20:08 [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0 Stefan Berger
@ 2011-12-02 20:32 ` Eric Blake
  2011-12-02 20:52   ` Stefan Berger
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2011-12-02 20:32 UTC (permalink / raw)
  To: Stefan Berger; +Cc: libvirt, Anthony Liguori, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On 12/02/2011 01:08 PM, Stefan Berger wrote:
> 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(-)

While this solves the problem, I prefer Jirka's version as being more
complete.  NACK.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0
  2011-12-02 20:32 ` Eric Blake
@ 2011-12-02 20:52   ` Stefan Berger
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Berger @ 2011-12-02 20:52 UTC (permalink / raw)
  To: Eric Blake; +Cc: libvirt, Anthony Liguori, qemu-devel

On 12/02/2011 03:32 PM, Eric Blake wrote:
> On 12/02/2011 01:08 PM, Stefan Berger wrote:
>> 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(-)
> While this solves the problem, I prefer Jirka's version as being more
> complete.  NACK.
>
No problem.
What's unfortunate about it is that the parser was not flexible to 
handle it, thus 0.9.8 will presumably be the first version to accept 
Qemu 1.0.

     Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-02 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 20:08 [Qemu-devel] [PATCH] Adapt libvirt's Qemu version parser for Qemu 1.0 Stefan Berger
2011-12-02 20:32 ` Eric Blake
2011-12-02 20:52   ` Stefan Berger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).