1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-26 10:46:16 +02:00

qi-add-report-sector-for-ext2-errors.patch

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-11-28 10:16:40 +00:00 committed by Andy Green
parent 7d1786f9a3
commit aaa0586a8f

View File

@ -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, if (this_kernel->block_read(buf, partition_offset_blocks + sector,
block_len / SECTOR_SIZE) < 0) { block_len / SECTOR_SIZE) < 0) {
puts(" ** ext2fs_devread() read error - block\n"); puts(" ** ext2fs_devread() read error - block\n");
printdec(partition_offset_blocks + sector);
puts(" ");
print32(block_len);
puts(" ");
print32(sector);
return 0; return 0;
} }
block_len = byte_len & ~(SECTOR_SIZE - 1); 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, if (this_kernel->block_read(sec_buf,
partition_offset_blocks + sector, 1) != 1) { partition_offset_blocks + sector, 1) != 1) {
puts(" ** ext2fs_devread() read error - last part\n"); puts(" ** ext2fs_devread() read error - last part\n");
printdec(partition_offset_blocks + sector);
puts(" ");
print32(block_len);
puts(" ");
print32(sector);
return 0; return 0;
} }
memcpy (buf, sec_buf, byte_len); memcpy (buf, sec_buf, byte_len);