From 23f12d626f33bf03295ca4c1165155cfacec01ed Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 19 Sep 2025 13:20:40 -0400 Subject: kern: vfs: Add mountpoint lookup helper Add helper function to lookup mountpoints such as '/' Signed-off-by: Ian Moffett --- src/sys/include/sys/mount.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/sys/include') diff --git a/src/sys/include/sys/mount.h b/src/sys/include/sys/mount.h index 3c4d0be..c93eb2b 100644 --- a/src/sys/include/sys/mount.h +++ b/src/sys/include/sys/mount.h @@ -117,6 +117,17 @@ struct vfsops { int(*mount)(struct fs_info *fip, struct mount_args *margs); }; +/* + * Lookup a mountpoint existing on the system + * + * @name: Name of mountpoint + * @mp_res: Result of mountpoint is written here + * + * Returns zero on success, otherwise a less than zero + * value to indicate failure + */ +int mount_lookup(const char *name, struct mount **mp_res); + /* * Mount a specific filesystem * -- cgit v1.2.3