openvz: support vzctl 3.1

https://bugzilla.redhat.com/show_bug.cgi?id=809895

Basically, openvz dropped strict version numbering (3.1 vs 3.1.0),
which caused parsing to fail.
This commit is contained in:
Ilja Livenson 2012-04-04 14:30:43 -06:00 committed by Eric Blake
parent e7eca6e4be
commit 37075dfe6c
2 changed files with 3 additions and 2 deletions

View File

@ -228,6 +228,7 @@ Patches have also been contributed by:
Li Zhang <zhlcindy@linux.vnet.ibm.com>
Stef Walter <stefw@gnome.org>
Christian Benvenuti <benve@cisco.com>
Ilja Livenson <ilja.livenson@gmail.com>
[....send patches to get your name here....]

View File

@ -1,7 +1,7 @@
/*
* openvz_conf.c: config functions for managing OpenVZ VEs
*
* Copyright (C) 2010-2011 Red Hat, Inc.
* Copyright (C) 2010-2012 Red Hat, Inc.
* Copyright (C) 2006, 2007 Binary Karma
* Copyright (C) 2006 Shuveb Hussain
* Copyright (C) 2007 Anoop Joe Cyriac
@ -99,7 +99,7 @@ openvzExtractVersionInfo(const char *cmdstr, int *retversion)
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)