summaryrefslogtreecommitdiff
path: root/kernel/fs/ext2.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-13 19:45:22 +0100
committerAnton Kling <anton@kling.gg>2023-11-13 19:50:11 +0100
commit6409d37d365778436e08b07221153454b0be6e57 (patch)
treecc785235601bdb39b4787abcbfa411888f954645 /kernel/fs/ext2.c
parent1de1e8d02f392ed8bb061705d7717351bf3023bd (diff)
AHCI: Add write function.
This also changes the ext2 filesystem so it will now write to the file it mounted. Currently the file mounted is /dev/sda which points to a SATA drive.
Diffstat (limited to 'kernel/fs/ext2.c')
-rw-r--r--kernel/fs/ext2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fs/ext2.c b/kernel/fs/ext2.c
index 17d9e11..4a45907 100644
--- a/kernel/fs/ext2.c
+++ b/kernel/fs/ext2.c
@@ -73,7 +73,7 @@ void ext2_write_block(u32 block, void *address, size_t size, size_t offset) {
break;
}
}
- write_lba(block * block_byte_size / 512, address, size, offset);
+ raw_vfs_pwrite(mount_fd, address, size, block * block_byte_size + offset);
}
void write_group_descriptor(u32 group_index, bgdt_t *block_group) {