From 94de72b919d2a6bdf8f89973b682a53225bf5fcb Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Tue, 1 Jun 2010 15:19:25 +0000 Subject: 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 Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5602 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/boot/selfboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/boot') diff --git a/src/boot/selfboot.c b/src/boot/selfboot.c index b945e0b4c6..f3f1aa38c5 100644 --- a/src/boot/selfboot.c +++ b/src/boot/selfboot.c @@ -473,6 +473,8 @@ static int load_self_segments( 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 @@ static int load_self_segments( } 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, -- cgit v1.2.3