aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/elf.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-02 13:41:55 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-02 13:41:55 -0700
commit1fee71bb7aeda05ae93af965a61afc04bfce77c2 (patch)
tree7fe0c1b6f00a7df87d60757e56a97e760beb06b8 /com32/modules/elf.c
parent0cc9fff83bb9bbceb273815ca53105bc184e8a52 (diff)
downloadsyslinux-1fee71bb7aeda05ae93af965a61afc04bfce77c2.tar.gz
syslinux-1fee71bb7aeda05ae93af965a61afc04bfce77c2.tar.xz
syslinux-1fee71bb7aeda05ae93af965a61afc04bfce77c2.zip
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.
Diffstat (limited to 'com32/modules/elf.c')
-rw-r--r--com32/modules/elf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/modules/elf.c b/com32/modules/elf.c
index 3fb1ad6f..35463c28 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 */
}