[PATCH] openvz: Allow missing micro tag in the version

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

 



No reason to cause the openvz driver to fail on startup if
the micro tag in missed. This solves the problem:

https://www.redhat.com/archives/libvirt-users/2012-March/msg00202.html
---
 src/openvz/openvz_conf.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 28f86ff..da6869b 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -95,11 +95,13 @@ openvzExtractVersionInfo(const char *cmdstr, int *retversion)
 
     tmp = help;
 
-    /* expected format: vzctl version <major>.<minor>.<micro> */
+    /* expected format: vzctl version <major>.<minor>.<micro>,
+     * missing <micro> is allowed.
+     */
     if ((tmp = STRSKIP(tmp, "vzctl version ")) == NULL)
         goto cleanup;
 
-    if (virParseVersionString(tmp, &version, false) < 0)
+    if (virParseVersionString(tmp, &version, true) < 0)
         goto cleanup;
 
     if (retversion)
-- 
1.7.7.3

--
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]