[libvirt] [PATCHv3] util: choose whether to require micro in version strings
Matthias Bolte
matthias.bolte at googlemail.com
Fri Jul 1 17:12:19 UTC 2011
2011/7/1 Eric Blake <eblake at redhat.com>:
> To avoid regressions, we let callers specify whether to require a
> micro version. Callers that were parsing uname() output benefit
Actually this affects minor and micro.
> from the defaults, whereas callers that were parsing version strings
> from other sources should not change in behavior.
>
> * src/util/util.c (virParseVersionString): Allow caller to choose
> whether to fail if micro is missing.
Here too.
> * src/util/util.h (virParseVersionString): Update signature.
> * src/esx/esx_driver.c (esxGetVersion): Update callers.
> * src/lxc/lxc_driver.c (lxcVersion): Likewise.
> * src/openvz/openvz_conf.c (openvzExtractVersionInfo): Likewise.
> * src/uml/uml_driver.c (umlGetVersion): Likewise.
> * src/vbox/vbox_MSCOMGlue.c (vboxLookupVersionInRegistry):
> Likewise.
> * src/vbox/vbox_tmpl.c (vboxExtractVersion): Likewise.
> * src/vmware/vmware_conf.c (vmwareExtractVersion): Likewise.
> * src/xenapi/xenapi_driver.c (xenapiGetVersion): Likewise.
> Reported by Matthias Bolte.
> ---
>
> For the avoidance of any doubt, I'm posting a complete v3.
>
> v2: check for overflow
> v3: constrain result to 32-bits
>
> src/esx/esx_driver.c | 2 +-
> src/lxc/lxc_driver.c | 2 +-
> src/openvz/openvz_conf.c | 2 +-
> src/uml/uml_driver.c | 2 +-
> src/util/util.c | 14 +++++++++++++-
> src/util/util.h | 3 ++-
> src/vbox/vbox_MSCOMGlue.c | 2 +-
> src/vbox/vbox_tmpl.c | 2 +-
> src/vmware/vmware_conf.c | 2 +-
> src/xenapi/xenapi_driver.c | 2 +-
> 10 files changed, 23 insertions(+), 10 deletions(-)
ACK.
--
Matthias Bolte
http://photron.blogspot.com
More information about the libvir-list
mailing list