Hi.

This patch fixes the problem on some machines when -d is specified,
that caused the crash utility not to recognize the excluded pages.
makedumpfile creates 2 bitmaps (1st-bitmap & 2nd-bitmap) on block_size
boundary and crash required both of them to be aligned to block_size
boundary, but the old version only aligned one of them.  This patch
changes the length of the bitmaps and aligns both bitmaps to
block_size boundary.

Thanks
Ken'ichi Ohmichi


diff -puN backup/v1.0.4/makedumpfile.c makedumpfile/makedumpfile.c
--- backup/v1.0.4/makedumpfile.c        2006-11-15 18:36:27.000000000 +0900
+++ makedumpfile/makedumpfile.c 2006-11-16 14:55:37.000000000 +0900
@@ -578,9 +578,8 @@ get_elf_info(struct DumpInfo *info)
        info->page_size = sysconf(_SC_PAGE_SIZE);
 
        info->max_mapnr = get_max_mapnr(info);
-       tmp = 2*divideup(info->max_mapnr, BITPERBYTE);
-       tmp = divideup(tmp, info->page_size);
-       info->len_bitmap = tmp*info->page_size;
+       tmp = divideup(divideup(info->max_mapnr, BITPERBYTE), info->page_size);
+       info->len_bitmap = tmp*info->page_size*2;
        if (info->flag_exclude_free)
                info->len_3rd_bitmap = info->len_bitmap / 2;
 
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to