diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2012-12-25 17:35:51 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-03-05 11:27:23 +0900 |
commit | c37f23c20bf4f15b951f1bbbb9c69e42a00dff3c (patch) | |
tree | 209c6751d5aa626cb81f66d65d759418516b1792 /kexec/arch/i386/kexec-x86-common.c | |
parent | 49c1e81305cf4de6693007df0465c3eac02bd5bd (diff) |
kexec: use dbgprintf instead of #if 0 for debug printing
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
[ horms@verge.net.au: Applied manually due to conflict ]
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/i386/kexec-x86-common.c')
-rw-r--r-- | kexec/arch/i386/kexec-x86-common.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c index 02471a8..234823c 100644 --- a/kexec/arch/i386/kexec-x86-common.c +++ b/kexec/arch/i386/kexec-x86-common.c @@ -88,10 +88,9 @@ static int get_memory_ranges_proc_iomem(struct memory_range **range, int *ranges continue; str = line + consumed; end = end + 1; -#if 0 - printf("%016Lx-%016Lx : %s", - start, end, str); -#endif + + dbgprintf("%016Lx-%016Lx : %s", start, end, str); + if (memcmp(str, "System RAM\n", 11) == 0) { type = RANGE_RAM; } @@ -110,10 +109,9 @@ static int get_memory_ranges_proc_iomem(struct memory_range **range, int *ranges memory_range[memory_ranges].start = start; memory_range[memory_ranges].end = end; memory_range[memory_ranges].type = type; -#if 0 - printf("%016Lx-%016Lx : %x\n", - start, end, type); -#endif + + dbgprintf("%016Lx-%016Lx : %x\n", start, end, type); + memory_ranges++; } fclose(fp); @@ -479,17 +477,11 @@ int get_memory_ranges(struct memory_range **range, int *ranges, mem_max = end; } - /* just set 0 to 1 to enable printing for debugging */ -#if 0 - { - int i; - printf("MEMORY RANGES\n"); - for (i = 0; i < *ranges; i++) { - printf("%016Lx-%016Lx (%d)\n", (*range)[i].start, - (*range)[i].end, (*range)[i].type); - } + dbgprintf("MEMORY RANGES\n"); + for (i = 0; i < *ranges; i++) { + dbgprintf("%016Lx-%016Lx (%d)\n", (*range)[i].start, + (*range)[i].end, (*range)[i].type); } -#endif return ret; } |