From 51e23753f4e98ef278324e3ea13f9617fe3a7a80 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 25 Mar 2024 21:22:16 -0400 Subject: kernel: vfs_lookup: Return -EINVAL instead of -1 Signed-off-by: Ian Moffett --- sys/kern/vfs_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 1398964..d2cbdf2 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -134,9 +134,9 @@ vfs_path_to_node(const char *path, struct vnode **vp) int s = 0, fs_caps = 0; if (strcmp(path, "/") == 0 || !vfs_is_valid_path(path)) { - return -1; + return -EINVAL; } else if (*path != '/') { - return -1; + return -EINVAL; } /* Fetch filesystem capabilities if we can */ -- cgit v1.2.3