summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-09-07 13:23:55 -0700
committerSimon Horman <horms@verge.net.au>2010-09-09 17:02:48 +0900
commit75d3ea06601a2712f189f03504bb77e92cce0754 (patch)
tree7b06b9554e605bd27b121cf5aa76bb176b0dcfab /kexec
parentedde67be9fed2f3d8667bbd30cd5231a2f6a3033 (diff)
i386 crashdump: move crashdump debugging code under #ifdef DEBUG
o Put the debug code under #ifdef DEBUG instead of #if 0. o Do this to match the x86_64 code. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r--kexec/arch/i386/crashdump-x86.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index f295298..4b45067 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -94,7 +94,7 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
if (count != 2)
continue;
str = line + consumed;
-#if 0
+#ifdef DEBUG
printf("%016Lx-%016Lx : %s",
start, end, str);
#endif
@@ -177,7 +177,7 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
}
*range = crash_memory_range;
*ranges = memory_ranges;
-#if 0
+#ifdef DEBUG
int i;
printf("CRASH MEMORY RANGES\n");
for(i = 0; i < memory_ranges; i++) {
@@ -272,7 +272,7 @@ static int add_memmap(struct memory_range *memmap_p, unsigned long long addr,
memmap_p[j+1] = memmap_p[j];
memmap_p[tidx].start = addr;
memmap_p[tidx].end = addr + size - 1;
-#if 0
+#ifdef DEBUG
printf("Memmap after adding segment\n");
for (i = 0; i < CRASH_MAX_MEMMAP_NR; i++) {
mstart = memmap_p[i].start;
@@ -358,7 +358,7 @@ static int delete_memmap(struct memory_range *memmap_p, unsigned long long addr,
memmap_p[j-1] = memmap_p[j];
memmap_p[j-1].start = memmap_p[j-1].end = 0;
}
-#if 0
+#ifdef DEBUG
printf("Memmap after deleting segment\n");
for (i = 0; i < CRASH_MAX_MEMMAP_NR; i++) {
mstart = memmap_p[i].start;
@@ -433,8 +433,7 @@ static int cmdline_add_memmap(char *cmdline, struct memory_range *memmap_p)
die("Command line overflow\n");
strcat(cmdline, str_mmap);
}
-
-#if 0
+#ifdef DEBUG
printf("Command line after adding memmap\n");
printf("%s\n", cmdline);
#endif
@@ -462,7 +461,7 @@ static int cmdline_add_elfcorehdr(char *cmdline, unsigned long addr)
if (cmdlen > (COMMAND_LINE_SIZE - 1))
die("Command line overflow\n");
strcat(cmdline, str);
-#if 0
+#ifdef DEBUG
printf("Command line after adding elfcorehdr\n");
printf("%s\n", cmdline);
#endif
@@ -495,7 +494,7 @@ static int get_crash_notes(int cpu, uint64_t *addr, uint64_t *len)
*addr = x86__pa(vaddr + (cpu * MAX_NOTE_BYTES));
*len = MAX_NOTE_BYTES;
-#if 0
+#ifdef DEBUG
printf("crash_notes addr = %Lx\n", *addr);
#endif
return 0;