tags 495830 +pending thanks On Wed, Aug 20, 2008 at 03:30:34PM -0400, Dale Harris wrote: > Package: e2fsprogs > Version: 1.41.0-3 > Severity: normal > > Perhaps I'm just doing this wrong, but it seems it should work: > > arrr:/test# e2image /dev/rootvg/tmplv tmplv.img > e2image 1.41.0 (10-Jul-2008) > arrr:/test# debugfs -d /dev/rootvg/tmplv -i tmplv.img > debugfs 1.41.0 (10-Jul-2008) > tmplv.img: Attempt to read block from filesystem resulted in short read while > reading inode bitmap > debugfs: quit
Yep, that was a bug I introduced in e2fsprogs 1.41.0. Thanks for pointing that out. Here's the fix I've checked into the maint branch of e2fsprogs; it will be in the next release. - Ted commit 57fd39e94339f6a60f3c1df0818e5305cdbb7569 Author: Theodore Ts'o <[EMAIL PROTECTED]> Date: Thu Aug 21 17:56:44 2008 -0400 libext2fs: Fix reading bitmaps from e2image files Fix a signed vs. unsigned bug that was accidentally introduced in commit f1f115a7, which was introduced in e2fsprogs 1.41.0 Addresses-Debian-Bug: #495830 Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]> diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c index b7fda5a..d3bdc2a 100644 --- a/lib/ext2fs/rw_bitmaps.c +++ b/lib/ext2fs/rw_bitmaps.c @@ -139,8 +139,8 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block) char *block_bitmap = 0, *inode_bitmap = 0; char *buf; errcode_t retval; - unsigned int block_nbytes = EXT2_BLOCKS_PER_GROUP(fs->super) / 8; - unsigned inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8; + int block_nbytes = EXT2_BLOCKS_PER_GROUP(fs->super) / 8; + int inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8; int csum_flag = 0; int do_image = fs->flags & EXT2_FLAG_IMAGE_FILE; unsigned int cnt; @@ -169,7 +169,7 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block) if (retval) goto cleanup; retval = ext2fs_get_mem(do_image ? fs->blocksize : - block_nbytes, &block_bitmap); + (unsigned) block_nbytes, &block_bitmap); if (retval) goto cleanup; } else @@ -182,7 +182,7 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block) if (retval) goto cleanup; retval = ext2fs_get_mem(do_image ? fs->blocksize : - inode_nbytes, &inode_bitmap); + (unsigned) inode_nbytes, &inode_bitmap); if (retval) goto cleanup; } else -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]