Author: myles
Date: Tue Jun  1 17:19:25 2010
New Revision: 5602
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5602

Log:
Check the value of ulzma and do not continue if there was an error.

Print fewer characters for pointers to make the output more concise.

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

Modified:
   trunk/src/boot/selfboot.c

Modified: trunk/src/boot/selfboot.c
==============================================================================
--- trunk/src/boot/selfboot.c   Tue Jun  1 12:04:28 2010        (r5601)
+++ trunk/src/boot/selfboot.c   Tue Jun  1 17:19:25 2010        (r5602)
@@ -473,6 +473,8 @@
                                case CBFS_COMPRESS_LZMA: {
                                        printk(BIOS_DEBUG, "using LZMA\n");
                                        len = ulzma(src, dest);
+                                       if (!len) /* Decompression Error. */
+                                               return 0;
                                        break;
                                }
 #if CONFIG_COMPRESSED_PAYLOAD_NRV2B==1
@@ -495,7 +497,7 @@
                        }
                        end = dest + ptr->s_memsz;
                        middle = dest + len;
-                       printk(BIOS_SPEW, "[ 0x%016lx, %016lx, 0x%016lx) <- 
%016lx\n",
+                       printk(BIOS_SPEW, "[ 0x%08lx, %08lx, 0x%08lx) <- 
%08lx\n",
                                (unsigned long)dest,
                                (unsigned long)middle,
                                (unsigned long)end,

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

Reply via email to