From 4d46d6bb37c97050980ec5d0c29ee03e82cf9b63 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 25 Apr 2020 19:45:47 +0200 Subject: Fixed ext2 reading by using genext2fs As the debian versions use a horribly old version of genext2fs, this program gets compiled in the build process now. --- src/kernel/fs/ext2.c | 4 ++-- src/kernel/fs/ext2.h | 2 +- src/kernel/fs/load.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kernel/fs') diff --git a/src/kernel/fs/ext2.c b/src/kernel/fs/ext2.c index 4e7a384..afab33d 100644 --- a/src/kernel/fs/ext2.c +++ b/src/kernel/fs/ext2.c @@ -241,7 +241,7 @@ uint8_t *read_file(char *path) ext2_open_inode(inode, &file); if (inode != 0) { size_t size = file.inode.size; - debug("%d", size); + debug("%dKiB", size >> 10); uint8_t *buf = kmalloc(size); ext2_read(&file, buf, size); kfree(file.buf); @@ -251,4 +251,4 @@ uint8_t *read_file(char *path) warn("File not found"); return NULL; } -} +} \ No newline at end of file diff --git a/src/kernel/fs/ext2.h b/src/kernel/fs/ext2.h index 7fbe493..88515a3 100644 --- a/src/kernel/fs/ext2.h +++ b/src/kernel/fs/ext2.h @@ -139,4 +139,4 @@ uint32_t ext2_look_up_path(char *path); uint8_t *read_file(char *path); -#endif +#endif \ No newline at end of file diff --git a/src/kernel/fs/load.c b/src/kernel/fs/load.c index 09e6dbc..59bb905 100644 --- a/src/kernel/fs/load.c +++ b/src/kernel/fs/load.c @@ -10,4 +10,4 @@ void load_binaries() font = (struct font *)read_file("/bin/font"); log("Successfully loaded binaries"); -} +} \ No newline at end of file -- cgit v1.2.3