diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2012-05-14 14:34:56 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-05-18 11:56:22 +0900 |
commit | e22ba509d252587a60aca035228faf49c2d47958 (patch) | |
tree | 39b8a3f0fd5b192caa99defec1d26ecea372be52 /kexec/arch/ppc64/crashdump-ppc64.c | |
parent | a287e2b3a9ee0424cbccd4cf054713ac76bbf149 (diff) |
ppc: move DEBUG code to --debug
From: Cong Wang <xiyou.wangcong@gmail.com>
V2: Fix a compile error
Like commit 28d4ab53280853d2aeefdfb7c369331e89ab9ac2
("Add generic debug option"), this one moves code
under #if DEBUG to --debug on ppc arch.
Sorry that I still can't find a ppc32 machine to test this.
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc64/crashdump-ppc64.c')
-rw-r--r-- | kexec/arch/ppc64/crashdump-ppc64.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c index b5ec2c8..30ef443 100644 --- a/kexec/arch/ppc64/crashdump-ppc64.c +++ b/kexec/arch/ppc64/crashdump-ppc64.c @@ -304,15 +304,15 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges) *range = crash_memory_range; *ranges = memory_ranges; -#if DEBUG + int j; - printf("CRASH MEMORY RANGES\n"); + dbgprintf("CRASH MEMORY RANGES\n"); for(j = 0; j < *ranges; j++) { start = crash_memory_range[j].start; end = crash_memory_range[j].end; - fprintf(stderr, "%016Lx-%016Lx\n", start, end); + dbgprintf("%016Lx-%016Lx\n", start, end); } -#endif + return 0; err: @@ -367,9 +367,7 @@ static int add_cmdline_param(char *cmdline, uint64_t addr, char *cmdstr, if (cmdlen > (COMMAND_LINE_SIZE - 1)) die("Command line overflow\n"); strcat(cmdline, str); -#if DEBUG - fprintf(stderr, "Command line after adding elfcorehdr: %s\n", cmdline); -#endif + dbgprintf("Command line after adding elfcorehdr: %s\n", cmdline); return 0; } @@ -490,10 +488,8 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size) usablemem_rgns.ranges[usablemem_rgns.size].start = base; usablemem_rgns.ranges[usablemem_rgns.size++].end = end; -#ifdef DEBUG - fprintf(stderr, "usable memory rgns size:%u base:%llx size:%llx\n", + dbgprintf("usable memory rgns size:%u base:%llx size:%llx\n", usablemem_rgns.size, base, size); -#endif } int is_crashkernel_mem_reserved(void) |