[coreboot] [PATCH] v3: print name of compression algorithm

Stefan Reinauer stepan at coresystems.de
Sun Feb 17 14:26:26 CET 2008


Carl-Daniel Hailfinger wrote:
> On 17.02.2008 13:02, Carl-Daniel Hailfinger wrote:
>   
>> On 17.02.2008 05:02, Peter Stuge wrote:
>>   
>>     
>>> On Sun, Feb 17, 2008 at 12:34:24AM +0100, Carl-Daniel Hailfinger wrote:
>>>   
>>>     
>>>       
>>>> +enum compalgo {
>>>> +	none = 0,
>>>> +	lzma = 1,
>>>> +	nrv2b = 2,
>>>> +	zeroes = 3,
>>>> +	/* invalid should always be the last entry. */
>>>> +	invalid
>>>> +};
>>>>     
>>>>       
>>>>         
>>> It's fairly common to uppercase these. Do we want that too?
>>>   
>>>     
>>>       
>> This was just a straight copy from util/lar, but I agree. We use these 
>> enums like #defines, so uppercasing seems indeed the best way to bring 
>> this hint to the developer.
>>   
>>     
>
> Uppercasing also found a name clash between NONE as compression algo and 
> NONE as operation mode of util/lar.
>
> Print name of compression algorithm in addition to the corresponding 
> number during boot.
> Convert process_file() to use enum compalgo instead of hardcoded 
> "1","2","3" and change the control structure from a series of if() 
> statements to a switch() statement.
>
> Compile and boot tested on Qemu.
>
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
>   

Acked-by: Stefan Reinauer <stepan at coresystems.de>



Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080217/307c3af9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080217/307c3af9/attachment.sig>


More information about the coreboot mailing list