diff options
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index f3161e5..3443b60 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -51,7 +51,7 @@ handle_t _syscall_open(const char __user *path, int len) { if (PATH_MAX < len) SYSCALL_RETURN(-1); - if (process_find_handle(process_current, 0) < 0) + if (process_find_free_handle(process_current, 0) < 0) SYSCALL_RETURN(-1); path_buf = virt_cpy2kmalloc(process_current->pages, path, len); @@ -184,7 +184,7 @@ handle_t _syscall_fs_fork2(void) { struct process *child; handle_t front; - front = process_find_handle(process_current, 1); + front = process_find_free_handle(process_current, 1); if (front < 0) SYSCALL_RETURN(-1); process_current->handles[front] = handle_init(HANDLE_FS_FRONT); |