From: H. Peter Anvin Date: Tue, 2 Oct 2007 20:41:55 +0000 (-0700) Subject: elf.c: better error message when memory is unavailable X-Git-Tag: syslinux-3.53-pre1~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fee71bb7aeda05ae93af965a61afc04bfce77c2;p=profile%2Fivi%2Fsyslinux.git elf.c: better error message when memory is unavailable Print something other than just "invalid ELF file or insufficient memory" when the specific error is that a specific memory segment is not available. --- diff --git a/com32/modules/elf.c b/com32/modules/elf.c index 3fb1ad6..35463c2 100644 --- a/com32/modules/elf.c +++ b/com32/modules/elf.c @@ -141,7 +141,8 @@ int boot_elf(void *ptr, size_t len, char **argv) dprintf("Segment at 0x%08x len 0x%08x\n", ph->p_paddr, ph->p_memsz); if (syslinux_memmap_type(amap, ph->p_paddr, ph->p_memsz) != SMT_FREE) { - dprintf("Region not free!\n"); + printf("Memory segment at 0x%08x (len 0x%08x) is unavailable\n", + ph->p_paddr, ph->p_memsz); goto bail; /* Memory region unavailable */ }