From 1fee71bb7aeda05ae93af965a61afc04bfce77c2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 2 Oct 2007 13:41:55 -0700 Subject: [PATCH] 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. --- com32/modules/elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ } -- 2.7.4