summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2009-01-16 19:11:45 +0100
committerSimon Horman <horms@verge.net.au>2009-01-19 12:14:05 +1100
commit988a8a9c29230233abf7772bc3dce00603f3011a (patch)
tree74e96d31a6f880b849a9705531ef94a9e63164b2
parent95c74405638c786bc76fbca5e4e8427dfe26e907 (diff)
printf() consolidation
Remove the fprintf(stderr,...) in get_memory_ranges() that adds unnecessary output in the normal kexec case that the user don't want to see. Use dbgprintf() in get_base_ranges() instead of #ifdef DEBUG fprintf(stderr,...) #endif to to make the code more readable. Signed-off-by: Bernhard Walle <bwalle@suse.de>diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c index ad8a31c..8d4e42b 100644 Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index ad8a31c..8d4e42b 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -263,9 +263,8 @@ static int get_base_ranges(void)
closedir(dir);
sort_base_ranges();
memory_max = base_memory_range[nr_memory_ranges - 1].end;
-#ifdef DEBUG
- fprintf(stderr, "get base memory ranges:%d\n", nr_memory_ranges);
-#endif
+ dbgprintf("get base memory ranges:%d\n", nr_memory_ranges);
+
return 0;
}
@@ -726,7 +725,7 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
sizeof(struct memory_range) * nr_memory_ranges);
*ranges = nr_memory_ranges;
- fprintf(stderr, "get memory ranges:%d\n", nr_memory_ranges);
+ dbgprintf("get memory ranges:%d\n", nr_memory_ranges);
return 0;
}