Author: stepan
Date: 2009-09-25 23:57:25 +0200 (Fri, 25 Sep 2009)
New Revision: 4676

Modified:
   trunk/coreboot-v2/src/lib/lzma.c
Log:
improve lzma error messages. When coreboot panics because lzma decompression
goes wrong, it might not be clear that it's lzma that failed, if the log level
is low enough..

Signed-off-by: Stefan Reinauer <[email protected]>
Acked-by: Stefan Reinauer <[email protected]>



Modified: trunk/coreboot-v2/src/lib/lzma.c
===================================================================
--- trunk/coreboot-v2/src/lib/lzma.c    2009-09-25 19:53:59 UTC (rev 4675)
+++ trunk/coreboot-v2/src/lib/lzma.c    2009-09-25 21:57:25 UTC (rev 4676)
@@ -29,19 +29,19 @@
        memcpy(properties, src, LZMA_PROPERTIES_SIZE);
        outSize = *(UInt32 *)(src + LZMA_PROPERTIES_SIZE);
        if (LzmaDecodeProperties(&state.Properties, properties, 
LZMA_PROPERTIES_SIZE) != LZMA_RESULT_OK) {
-               printk_warning("Incorrect stream properties\n");
+               printk_warning("lzma: Incorrect stream properties.\n");
                return 0;
        }
        mallocneeds = (LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
        if (mallocneeds > 15980) {
-               printk_warning("Decoder scratchpad too small!\n");
+               printk_warning("lzma: Decoder scratchpad too small!\n");
                return 0;
        }
        state.Probs = (CProb *)scratchpad;
        res = LzmaDecode(&state, src + LZMA_PROPERTIES_SIZE + 8, 
(SizeT)0xffffffff, &inProcessed,
                dst, outSize, &outProcessed);
        if (res != 0) {
-               printk_warning("Decoding error = %d\n", res);
+               printk_warning("lzma: Decoding error = %d\n", res);
                return 0;
        }
        return outSize;


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

Reply via email to