[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] fix virParseVersionString with linux 3.0



On 07/01/2011 07:00 AM, Matthias Bolte wrote:
> 2011/7/1 Scott Moser <smoser 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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]