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_subr.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_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ac8a16b..64dd7c9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -62,19 +62,19 @@ vfs_hash(const char *data) * * @path: Path to hash. * - * Returns 0 on failure, non-zero return values + * Returns -1 on failure, >= 0 return values * are valid. */ -size_t +ssize_t vfs_hash_path(const char *path) { char *name = NULL; size_t i = 0, hash = 0; if (strcmp(path, "/") == 0 || !vfs_is_valid_path(path)) { - return 0; + return -1; } else if (*path != '/') { - return 0; + return -1; } do { |