[libvirt] [PATCH] openvz: fixed an config file parsing error

Eric Blake eblake at redhat.com
Mon Sep 15 15:28:13 UTC 2014


On 09/06/2014 09:30 PM, Hongbin Lu wrote:
> The OpenVZ driver reported an error on parsing some OpenVZ config
> parameters (e.g. diskspace). This issue is due to the driver made
> two incorrect assumptions about the value of the parameters:
> 1. Assume paramaeter is just a number (without unit suffix).
> 2. Assume the number is an integer.
> Actually, an OpenVZ config parameter may consist of a scalar and
> a unit, and the scalar is not necessary an integer (e.g. 2.2G).
> This patch is for fixing this issue.
> ---
>  src/openvz/openvz_conf.c |  109 +++++++++++++++++++++++++++++++++++++++++-----
>  src/util/virutil.c       |   84 ++++++++++++++++++++++++-----------
>  src/util/virutil.h       |    3 +
>  3 files changed, 157 insertions(+), 39 deletions(-)

This feels rather big; it might be nicer to split into two patches (one
to improve virutil.c and make sure the improvements are covered in the
testsuite; the other to improve openvz_conf.c to use the improved
virutils.c).



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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140915/30a89e49/attachment-0001.sig>


More information about the libvir-list mailing list