diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-19 00:42:14 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-19 00:42:14 -0400 |
commit | 6a0e4e3da5cf17635d094008c7cc5562b1f081e1 (patch) | |
tree | 95dfc7821f205d1658d63b769457018431904160 /src/sys/include/os | |
parent | 70dc7ad8924cf3e30e06b02698b1294fe9553538 (diff) |
kern: vfs: Add path component counter
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/os')
-rw-r--r-- | src/sys/include/os/vfs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sys/include/os/vfs.h b/src/sys/include/os/vfs.h index ec7eb77..a46bb18 100644 --- a/src/sys/include/os/vfs.h +++ b/src/sys/include/os/vfs.h @@ -54,4 +54,15 @@ int vfs_init(void); */ int vfs_by_index(uint16_t index, struct fs_info **resp); +/* + * Count the number of components within a path and + * return a negative value if the path is invalid. + * + * @path: Path to check + * + * Returns the number of components on success, + * otherwise a less than zero value on failure. + */ +int vfs_cmp_cnt(const char *path); + #endif /* !_OS_VFS_H_ */ |