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

Peter Stuge peter at stuge.se
Sun Feb 17 05:02:55 CET 2008


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?


> +	const char *algoname = algo_name[(archive->compression >= invalid)
> +					? invalid : archive->compression];

Not sure about invalid. I would be less worried if invalid was set to
some explicit value, e.g. -1. The current proposal means we can never
remove algorithms.


//Peter




More information about the coreboot mailing list