From 64f86a961daca3a1f6dfcbfca095c1e43e714eb1 Mon Sep 17 00:00:00 2001 From: Ruslan Isaev Date: Fri, 16 Jan 2026 17:46:00 +0300 Subject: [PATCH] syscalls: let open syscall work with directories --- src/tasking/syscalls.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tasking/syscalls.c b/src/tasking/syscalls.c index 5b9af8f..b92170d 100644 --- a/src/tasking/syscalls.c +++ b/src/tasking/syscalls.c @@ -298,7 +298,11 @@ int sys_open(TrapFrame *tf) l9660_seekdir(&temp_dir, 0); int status = follow_path(filename, file, &temp_dir); - if (status != L9660_OK) { + if(status == L9660_ENOTFILE) + { + current->file_descriptors[fd] = (l9660_file*)&temp_dir; + } + else if (status != L9660_OK) { free(file); return -2; // -ENOENT }