From 827189593c19182eebd4a83445d020b1f3ad022e Mon Sep 17 00:00:00 2001 From: Ruslan Isaev Date: Thu, 20 Nov 2025 16:12:40 +0300 Subject: [PATCH] syscalls: make chdir follow path from the current->cwd and return 0 if there's no error --- src/tasking/syscalls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tasking/syscalls.c b/src/tasking/syscalls.c index ef0d251..c6760dd 100644 --- a/src/tasking/syscalls.c +++ b/src/tasking/syscalls.c @@ -445,6 +445,8 @@ int sys_chdir(TrapFrame *tf) l9660_dir new_cwd; l9660_file placeholder_file; + new_cwd = *current->cwd; + int status = follow_path((char*)tf->ebx, &placeholder_file, &new_cwd); if(status == L9660_OK) @@ -466,6 +468,9 @@ int sys_chdir(TrapFrame *tf) case L9660_ENOTDIR: return -20;//ENOTDIR break; + case L9660_OK: + return 0; + break; default: return -5;//EIO break;