| LLAPI_SEARCH_ROOTPATH(3) | Lustre Library Functions | LLAPI_SEARCH_ROOTPATH(3) |
NAME
llapi_search_rootpath, llapi_search_rootpath_by_dev - retrieve the path of a lustre mount point
SYNOPSIS
#include <lustre/lustreapi.h>
int llapi_search_rootpath( char *pathname ,const char *fsname)
int llapi_search_rootpath_by_dev( char *pathname, dev_t dev)
DESCRIPTION
llapi_search_rootpath() and llapi_search_rootpath_by_dev() find the first Lustre mount point by matching the filesystem name fsname or the filesystem device dev.
The path of the mount point found is stored into pathname. This buffer should be sufficient to store the path.
e.g: char pathname[PATH_MAX];
The filesystem device can be retrieved from a file with stat() (field st_dev) or statx() (fields stx_dev_major and stx_dev_minor).
RETURN VALUES
- 0
- on success, or
- -ve
- error code on failure and sets errno appropriately.
ERRORS
AVAILABILITY
llapi_search_rootpath() and llapi_search_rootpath_by_dev() is part of the lustre(7) user application interface library. llapi_search_rootpath was added in release 2.4.0. llapi_search_rootpath_by_dev was added in release 2.16.0.
SEE ALSO
| 2024-08-28 | Lustre User API |