Signed-off-by: WANG Chao <chaowang at redhat.com> --- kexec/arch/i386/crashdump-x86.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index f97d79a..39c35ea 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -517,15 +517,7 @@ static int add_memmap(struct memory_range *memmap_p, int *nr_memmap, memmap_p[tidx].type = type; *nr_memmap = nr_entries + 1; - dbgprintf("Memmap after adding segment\n"); - for (i = 0; i < CRASH_MAX_MEMMAP_NR; i++) { - mstart = memmap_p[i].start; - mend = memmap_p[i].end; - if (mstart == 0 && mend == 0) - break; - dbgprintf("%016llx - %016llx\n", - mstart, mend); - } + dbgprint_mem_range("Memmap after adding segment", memmap_p, *nr_memmap); return 0; } @@ -605,16 +597,7 @@ static int delete_memmap(struct memory_range *memmap_p, int *nr_memmap, *nr_memmap = nr_entries - 1; } - dbgprintf("Memmap after deleting segment\n"); - for (i = 0; i < CRASH_MAX_MEMMAP_NR; i++) { - mstart = memmap_p[i].start; - mend = memmap_p[i].end; - if (mstart == 0 && mend == 0) { - break; - } - dbgprintf("%016llx - %016llx\n", - mstart, mend); - } + dbgprint_mem_range("Memmap after deleting segment", memmap_p, *nr_memmap); return 0; } @@ -913,10 +896,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline, get_backup_area(info, mem_range, nr_ranges); - dbgprintf("CRASH MEMORY RANGES\n"); - - for(i = 0; i < nr_ranges; ++i) - dbgprintf("%016Lx-%016Lx\n", mem_range[i].start, mem_range[i].end); + dbgprint_mem_range("CRASH MEMORY RANGES", mem_range, nr_ranges); /* * if the core type has not been set on command line, set it here -- 1.9.0