diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-01 18:44:59 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-01 18:44:59 -0500 |
commit | e410e54ed503c88bf5228986f906b233388685ea (patch) | |
tree | 4fe77c34f97ad4b1b57b470d2166e17ebd80a12b /sys/kern/vfs_mount.c | |
parent | 343d183cd0b7c81a70f576f8282d7ca8838b98a7 (diff) |
kernel: vfs: Return -1 on vfs_hash_path() failure
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r-- | sys/kern/vfs_mount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 53df6a2..3b1fcc5 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -72,7 +72,7 @@ vfs_create_mp(const char *path, int mntflags, struct mount **mp_out) int vfs_mount(const char *path, int mntflags) { - size_t hash = vfs_hash_path(path); + size_t hash; int status; struct mountlist_entry *entry; struct mount *mp; @@ -80,7 +80,7 @@ vfs_mount(const char *path, int mntflags) if ((status = vfs_create_mp(path, mntflags, &mp)) != 0) { return status; } - if (hash == 0) { + if (hash == -1) { /* Something is wrong with the path */ return -EINVAL; } |