summaryrefslogtreecommitdiff
path: root/kernel/fs/ext2.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-26 18:33:06 +0200
committerAnton Kling <anton@kling.gg>2024-06-26 18:36:23 +0200
commitb857f43b58b4e1e14e069afe1da6f6a05f3e6d9c (patch)
treef59214cb99a088b3e817f49884f54cfe3b5a7718 /kernel/fs/ext2.c
parenta9584c6b392c508e71f6452d7be1200a5914419d (diff)
Ext2: Bug fix
Diffstat (limited to 'kernel/fs/ext2.c')
-rw-r--r--kernel/fs/ext2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/fs/ext2.c b/kernel/fs/ext2.c
index 4a0dbd0..5416cab 100644
--- a/kernel/fs/ext2.c
+++ b/kernel/fs/ext2.c
@@ -308,7 +308,7 @@ u32 ext2_find_inode(const char *file) {
// The expected returned entry is a directory
if (TYPE_INDICATOR_DIRECTORY != a.type_indicator) {
kfree(orig_str);
- kprintf("FAILED\n");
+ klog(LOG_WARN, "ext2: Expected diretory but got: %d", a.type_indicator);
return 0;
}
}
@@ -431,7 +431,7 @@ int write_inode(int inode_num, u8 *data, u64 size, u64 offset, u64 *file_size,
int num_blocks_required = BLOCKS_REQUIRED(fsize, block_byte_size);
for (int i = num_blocks_used; i < num_blocks_required; i++) {
- if (i > 12) {
+ if (i >= 12) {
assert(0);
}
int b = get_free_block(1 /*true*/);