summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
authordzwdz2022-08-28 13:02:10 +0200
committerdzwdz2022-08-28 13:02:10 +0200
commitf0bda71fe2a4df4201c6195be1fe46cf895c134d (patch)
tree098f6d4007d74569d486b515d95986b8c145d492 /src/kernel/syscalls.c
parentc43b0ac7672b0d8fce8b1ea0a0dbe4383d60485e (diff)
shared/path_simplify: return an unsigned value
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index d7ac5b2..7b5d294 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -96,7 +96,7 @@ handle_t _syscall_open(const char __user *path, long len, int flags) {
if (!virt_cpy_from(process_current->pages, path_buf, path, len)) goto fail;
len = path_simplify(path_buf, path_buf, len);
- if (len < 0) goto fail;
+ if (len == 0) goto fail;
mount = vfs_mount_resolve(process_current->mount, path_buf, len);
if (!mount) goto fail;
@@ -138,7 +138,7 @@ long _syscall_mount(handle_t hid, const char __user *path, long len) {
if (!virt_cpy_from(process_current->pages, path_buf, path, len)) goto fail;
len = path_simplify(path_buf, path_buf, len);
- if (len < 0) goto fail;
+ if (len == 0) goto fail;
// remove trailing slash
// mounting something under `/this` and `/this/` should be equalivent