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 <[EMAIL PROTECTED]>

Acked-by: Stefan Reinauer <[EMAIL PROTECTED]>



Stefan

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

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to