diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-19 01:29:28 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-19 01:29:28 -0400 |
commit | 6412ff0bfbc76d302ef8f272db94be20195ba07a (patch) | |
tree | 5e30b7ffa2a8f70ef08e6143a901df87696601be /src/sys/os | |
parent | 6a0e4e3da5cf17635d094008c7cc5562b1f081e1 (diff) |
kernel: vfs: Handle root path in vfs_cmt_cnt()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/os')
-rw-r--r-- | src/sys/os/vfs_subr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sys/os/vfs_subr.c b/src/sys/os/vfs_subr.c index f9f4a60..6cb542c 100644 --- a/src/sys/os/vfs_subr.c +++ b/src/sys/os/vfs_subr.c @@ -111,6 +111,11 @@ vfs_cmp_cnt(const char *path) return -ENOENT; } + /* Is pointing to root? */ + if (path[0] == '/' && path[1] == '\0') { + return 1; + } + p = path; cnt = 0; |