From f40be8b5b6227775901a99946779661d0b4439e6 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 1 Nov 2020 12:35:00 +0100 Subject: Added files demo and needed functions --- kernel/features/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/features/fs.c b/kernel/features/fs.c index c52a7b6..ceb345d 100644 --- a/kernel/features/fs.c +++ b/kernel/features/fs.c @@ -151,7 +151,8 @@ int find_inode(const char *name, int dir_inode) do { // Calculate the 4byte aligned size of each entry sum += d->total_len; - if (strncmp((void *)d->name, name, d->name_len) == 0) { + if (strlen(name) == d->name_len && + strncmp((void *)d->name, name, d->name_len) == 0) { free(buf); return d->inode_num; } -- cgit v1.2.3