Skip to content
Snippets Groups Projects
Commit 48572612 authored by Byron Lathi's avatar Byron Lathi
Browse files

fix bug with reading multiple blocks

pointer arithmatic got me again, I need to add 512*16 bits
since buf is a 16 bit type.
parent ff6b4bdd
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ uint32_t ext2_read_data(uint32_t inode_num, uint32_t count, uint16_t* buf)
for (i = 0; i < 12 && blocks_left != 0; i++) {
if (!inode.block_pointer[i])
break;
ata_read_sectors(ATA_MASTER, ext2_base + inode.block_pointer[i] * 2, 2, buf + i * 1024);
ata_read_sectors(ATA_MASTER, ext2_base + inode.block_pointer[i] * 2, 2, buf + i * 512);
blocks_left--;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment