aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2011-08-02 00:00:43 +0200
committerMichal Soltys <soltys@ziu.info>2011-08-02 00:00:43 +0200
commitfde23299f87d6d187d3de2318d7fb82dce8090fd (patch)
tree312fb4237bb9d8f885d44b9b0999a4b0a0ee7e4f /com32/modules
parentd4347ad445ab417946413dd9fcbf6ea2b1e00747 (diff)
parentc210e571f61eeb898fadbb6f47d4a2c82e5bfbfd (diff)
downloadsyslinux-fde23299f87d6d187d3de2318d7fb82dce8090fd.tar.gz
syslinux-fde23299f87d6d187d3de2318d7fb82dce8090fd.tar.xz
syslinux-fde23299f87d6d187d3de2318d7fb82dce8090fd.zip
Merge remote-tracking branch 'origin/master' into chaindev
Conflicts: com32/modules/chain.c
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/elf.c16
-rw-r--r--com32/modules/ethersel.c7
-rw-r--r--com32/modules/pcitest.c7
-rw-r--r--com32/modules/pmload.c16
4 files changed, 12 insertions, 34 deletions
diff --git a/com32/modules/elf.c b/com32/modules/elf.c
index 182afa60..0ac45174 100644
--- a/com32/modules/elf.c
+++ b/com32/modules/elf.c
@@ -120,10 +120,8 @@ int boot_elf(void *ptr, size_t len, char **argv)
if (!mmap || !amap)
goto bail;
-#if DEBUG
dprintf("Initial memory map:\n");
- syslinux_dump_memmap(stdout, mmap);
-#endif
+ syslinux_dump_memmap(mmap);
ph = (Elf32_Phdr *) (cptr + eh->e_phoff);
@@ -185,10 +183,8 @@ int boot_elf(void *ptr, size_t len, char **argv)
if (!stack_frame)
goto bail;
-#if DEBUG
dprintf("Right before syslinux_memmap_largest()...\n");
- syslinux_dump_memmap(stdout, amap);
-#endif
+ syslinux_dump_memmap(amap);
if (syslinux_memmap_largest(amap, SMT_FREE, &lstart, &llen))
goto bail; /* NO free memory?! */
@@ -239,16 +235,14 @@ int boot_elf(void *ptr, size_t len, char **argv)
regs.eip = eh->e_entry;
regs.esp = stack_pointer;
-#if DEBUG
dprintf("Final memory map:\n");
- syslinux_dump_memmap(stdout, mmap);
+ syslinux_dump_memmap(mmap);
dprintf("Final available map:\n");
- syslinux_dump_memmap(stdout, amap);
+ syslinux_dump_memmap(amap);
dprintf("Movelist:\n");
- syslinux_dump_movelist(stdout, ml);
-#endif
+ syslinux_dump_movelist(ml);
/* This should not return... */
fputs("Booting...\n", stdout);
diff --git a/com32/modules/ethersel.c b/com32/modules/ethersel.c
index 5c3cf02a..28dc62ca 100644
--- a/com32/modules/ethersel.c
+++ b/com32/modules/ethersel.c
@@ -38,12 +38,7 @@
#include <com32.h>
#include <syslinux/boot.h>
#include <syslinux/config.h>
-
-#ifdef DEBUG
-# define dprintf printf
-#else
-# define dprintf(...) ((void)0)
-#endif
+#include <dprintf.h>
#define MAX_LINE 512
diff --git a/com32/modules/pcitest.c b/com32/modules/pcitest.c
index 672023ad..9921ee6d 100644
--- a/com32/modules/pcitest.c
+++ b/com32/modules/pcitest.c
@@ -39,12 +39,7 @@
#include <com32.h>
#include <sys/pci.h>
#include <stdbool.h>
-
-#ifdef DEBUG
-# define dprintf printf
-#else
-# define dprintf(...) ((void)0)
-#endif
+#include <dprintf.h>
char display_line = 0;
#define moreprintf(...) \
diff --git a/com32/modules/pmload.c b/com32/modules/pmload.c
index 3064a94f..4c01db08 100644
--- a/com32/modules/pmload.c
+++ b/com32/modules/pmload.c
@@ -81,10 +81,8 @@ int boot_raw(void *ptr, size_t len, addr_t where, char **argv)
if (!mmap || !amap)
goto bail;
-#if DEBUG
dprintf("Initial memory map:\n");
- syslinux_dump_memmap(stdout, mmap);
-#endif
+ syslinux_dump_memmap(mmap);
dprintf("Segment at 0x%08x len 0x%08x\n", where, len);
@@ -119,10 +117,8 @@ int boot_raw(void *ptr, size_t len, addr_t where, char **argv)
if (!stack_frame)
goto bail;
-#if DEBUG
dprintf("Right before syslinux_memmap_largest()...\n");
- syslinux_dump_memmap(stdout, amap);
-#endif
+ syslinux_dump_memmap(amap);
if (syslinux_memmap_largest(amap, SMT_FREE, &lstart, &llen))
goto bail; /* NO free memory?! */
@@ -173,16 +169,14 @@ int boot_raw(void *ptr, size_t len, addr_t where, char **argv)
regs.eip = where;
regs.esp = stack_pointer;
-#if DEBUG
dprintf("Final memory map:\n");
- syslinux_dump_memmap(stdout, mmap);
+ syslinux_dump_memmap(mmap);
dprintf("Final available map:\n");
- syslinux_dump_memmap(stdout, amap);
+ syslinux_dump_memmap(amap);
dprintf("Movelist:\n");
- syslinux_dump_movelist(stdout, ml);
-#endif
+ syslinux_dump_movelist(ml);
/* This should not return... */
fputs("Booting...\n", stdout);