summaryrefslogtreecommitdiff
path: root/com32/lib/syslinux/shuffle.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-02 15:46:28 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-11-02 15:46:28 -0700
commit529722ee73a54cdb51b68c2b29076d9b1e8980d6 (patch)
tree8251181233c53728d3b3b90cb2d6faecb21c6e47 /com32/lib/syslinux/shuffle.c
parent116c4b71bee6fa80d1d2c03f780a5ea64de3c886 (diff)
downloadsyslinux-529722ee73a54cdb51b68c2b29076d9b1e8980d6.tar.gz
Optional debugging code for shuffle and boot and load_linuxsyslinux-3.53-pre2
Put (disabled) debugging code in shuffle.c and load_linux.c for future needs.
Diffstat (limited to 'com32/lib/syslinux/shuffle.c')
-rw-r--r--com32/lib/syslinux/shuffle.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/com32/lib/syslinux/shuffle.c b/com32/lib/syslinux/shuffle.c
index 47ef51cb..774346ae 100644
--- a/com32/lib/syslinux/shuffle.c
+++ b/com32/lib/syslinux/shuffle.c
@@ -38,6 +38,16 @@
#include <com32.h>
#include <syslinux/movebits.h>
+#ifndef DEBUG
+# define DEBUG 0
+#endif
+#if DEBUG
+# include <stdio.h>
+# define dprintf printf
+#else
+# define dprintf(f, ...) ((void)0)
+#endif
+
struct shuffle_descriptor {
uint32_t dst, src, len;
};
@@ -53,6 +63,11 @@ int syslinux_prepare_shuffle(struct syslinux_movelist *fraglist,
if (syslinux_compute_movelist(&moves, fraglist, memmap))
goto bail;
+#if DEBUG
+ dprintf("Final movelist:\n");
+ syslinux_dump_movelist(stdout, moves);
+#endif
+
dp = __com32.cs_bounce;
np = 0;