[PATCH 1/2] Incorrect help screen parsing for QEMU 1.0.1 package fixed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Dmitry Fleytman dmitry@xxxxxxxxxx
---
 src/qemu/qemu_capabilities.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index ae26967..d2580b6 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1288,13 +1288,18 @@ int qemuCapsParseHelpStr(const char *qemu,
     if (minor == -1)
         goto fail;
 
-    if (*p != '.') {
+    if ((*p != '.') && (*p != ',')) {
         micro = 0;
     } else {
         ++p;
-        micro = virParseNumber(&p);
-        if (micro == -1)
-            goto fail;
+
+        if(*p == ' ') {
+            micro = 0; /* 1.0, case */
+        } else {
+           micro = virParseNumber(&p); /* 1.0,x case */
+           if (micro == -1)
+               goto fail;
+        }
     }
 
     SKIP_BLANKS(p);
-- 
1.7.11.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]