[libvirt] [PATCH] fix virParseVersionString with linux 3.0

Eric Blake eblake at redhat.com
Fri Jul 1 13:08:39 UTC 2011


On 07/01/2011 07:00 AM, Matthias Bolte wrote:
> 2011/7/1 Scott Moser <smoser at ubuntu.com>:
>> linux 3.0 has no micro version number, and that is causing problems
>> for virParseVersionString.  The patch below should allow for:
>>  major
>>  major.minor
>>  major.minor.micro
>>
>> If major or minor are not present they just default to zero.
>> We found this in Ubuntu (https://bugs.launchpad.net/bugs/802977)
>>
> 
> Well, your patch fixes the problem, but virParseVersionString is used
> in more places than just kernel version parsing, therefore I think it
> relaxes parsing too much and we need a stricter approach for this.

Hmm, I was just about to apply this patch.

Maybe the stricter approach is to add a bool argument that states
whether omitted arguments should be treated as 0 or as an error, and
update all (12) callers to choose which context is important.  I'll do
that as a followup after pushing Scott's patch.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list