From aaa0586a8f5d698878ea2bb2a57611038a5ccfe5 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 28 Nov 2008 10:16:40 +0000 Subject: [PATCH] qi-add-report-sector-for-ext2-errors.patch Signed-off-by: Andy Green --- qiboot/src/fs/dev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qiboot/src/fs/dev.c b/qiboot/src/fs/dev.c index ecb2a3a..694c8b1 100644 --- a/qiboot/src/fs/dev.c +++ b/qiboot/src/fs/dev.c @@ -96,6 +96,11 @@ int ext2fs_devread(int sector, int filesystem_block_log2, int byte_offset, int b if (this_kernel->block_read(buf, partition_offset_blocks + sector, block_len / SECTOR_SIZE) < 0) { puts(" ** ext2fs_devread() read error - block\n"); + printdec(partition_offset_blocks + sector); + puts(" "); + print32(block_len); + puts(" "); + print32(sector); return 0; } block_len = byte_len & ~(SECTOR_SIZE - 1); @@ -108,6 +113,11 @@ int ext2fs_devread(int sector, int filesystem_block_log2, int byte_offset, int b if (this_kernel->block_read(sec_buf, partition_offset_blocks + sector, 1) != 1) { puts(" ** ext2fs_devread() read error - last part\n"); + printdec(partition_offset_blocks + sector); + puts(" "); + print32(block_len); + puts(" "); + print32(sector); return 0; } memcpy (buf, sec_buf, byte_len);