aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs/fs.c
diff options
context:
space:
mode:
authorMarvin Borner2020-05-13 21:28:56 +0200
committerMarvin Borner2020-05-13 22:12:41 +0200
commita9c7529dcca845d98192ece62be70f752972216b (patch)
tree666d49ceb411a669abe6191151b2238fd7156c30 /src/kernel/fs/fs.c
parente1a6ed079303dc7d218f1d5326a13b6755781271 (diff)
Replaced alloc.h with liballoc
And many more adaptions to the lib
Diffstat (limited to 'src/kernel/fs/fs.c')
-rw-r--r--src/kernel/fs/fs.c6
1 files changed, 3 insertions, 3 deletions
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 {