]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: choose whether to require micro in version strings
authorEric Blake <eblake@redhat.com>
Fri, 1 Jul 2011 13:23:02 +0000 (07:23 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 1 Jul 2011 17:22:11 +0000 (11:22 -0600)
commit8ce1afff882e09575f9f5cb499e806d5cefde47d
treed7eca4de3d8d0bfd7c82739ee49aa4e40870f2e0
parent6ae3052c06cd97b00f99790cb95fc7f11971e985
util: choose whether to require micro in version strings

To avoid regressions, we let callers specify whether to require a
minor and micro version.  Callers that were parsing uname() output
benefit from defaulting to 0, 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 minor or micro is missing.
* 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.
src/esx/esx_driver.c
src/lxc/lxc_driver.c
src/openvz/openvz_conf.c
src/uml/uml_driver.c
src/util/util.c
src/util/util.h
src/vbox/vbox_MSCOMGlue.c
src/vbox/vbox_tmpl.c
src/vmware/vmware_conf.c
src/xenapi/xenapi_driver.c