From efff00256e222d096a608366523b67322b9c30fa Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 5 Sep 2007 01:53:37 +0000 Subject: [PATCH] cleanupmsg.diff changes the "(cleaned up) New segment.." message to be displayed only when the condition happens. Signed-off-by: Alex Beregszaszi Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@489 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- lib/elfboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/elfboot.c b/lib/elfboot.c index bdb48f5b23..c94fa4102a 100644 --- a/lib/elfboot.c +++ b/lib/elfboot.c @@ -103,11 +103,11 @@ static int load_elf_segments(struct lb_memory *mem,unsigned char *header, int he phdr[i].p_paddr, phdr[i].p_memsz, phdr[i].p_offset, phdr[i].p_filesz); /* Clean up the values */ size = phdr[i].p_filesz; - if (phdr[i].p_filesz > phdr[i].p_memsz) { + if (size > phdr[i].p_memsz) { size = phdr[i].p_memsz; + printk(BIOS_DEBUG, "(cleaned up) New segment addr 0x%x size 0x%x offset 0x%x\n", + phdr[i].p_paddr, size, phdr[i].p_offset); } - printk(BIOS_DEBUG, "(cleaned up) New segment addr 0x%x size 0x%x offset 0x%x\n", - phdr[i].p_paddr, size, phdr[i].p_offset); /* Verify the memory addresses in the segment are valid */ if (!valid_area(mem, phdr[i].p_paddr, size))