From a9c7529dcca845d98192ece62be70f752972216b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 13 May 2020 21:28:56 +0200 Subject: Replaced alloc.h with liballoc And many more adaptions to the lib --- src/kernel/fs/fs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/fs/fs.c') diff --git a/src/kernel/fs/fs.c b/src/kernel/fs/fs.c index a23b943..b9bada7 100644 --- a/src/kernel/fs/fs.c +++ b/src/kernel/fs/fs.c @@ -25,7 +25,7 @@ u32 read(char *path, u32 offset, u32 count, u8 *buf) if (inode != 0) { debug("Reading %s: %dKiB", path, count >> 10); ext2_read(&file, buf, count); - kfree(file.buf); + free(file.buf); buf[count - 1] = '\0'; return buf; } else { @@ -49,9 +49,9 @@ u8 *read_file(char *path) if (inode != 0) { u32 size = file.inode.size; debug("Reading %s: %dKiB", path, size >> 10); - u8 *buf = kmalloc(size); + u8 *buf = malloc(size); ext2_read(&file, buf, size); - kfree(file.buf); + free(file.buf); buf[size - 1] = '\0'; return buf; } else { -- cgit v1.2.3