aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/syslinux/shuffle.c
diff options
context:
space:
mode:
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;