|
|
e1f10b |
#ifndef _SYS_FS_H
|
|
|
e1f10b |
#define _SYS_FS_H
|
|
|
e1f10b |
|
|
|
e1f10b |
#ifdef __cplusplus
|
|
|
e1f10b |
extern "C" {
|
|
|
e1f10b |
#endif
|
|
|
e1f10b |
|
|
|
e1f10b |
#define __NEED_size_t
|
|
|
e1f10b |
|
|
|
e1f10b |
#include <bits/alltypes.h>
|
|
|
e1f10b |
|
|
|
e1f10b |
/***************************************************************************/
|
|
|
e1f10b |
/* int (*__fs_path_fn)(int fdat, const char * path, int options, */
|
|
|
e1f10b |
/* char * buffer, size_t buflen); */
|
|
|
e1f10b |
/* */
|
|
|
e1f10b |
/* resolve and obtain the full path using one of four supported notations: */
|
|
|
e1f10b |
/* */
|
|
|
e1f10b |
/* __fs_rpath(): root-relative notation (e.g. /bar) */
|
|
|
e1f10b |
/* __fs_apath(): root-based absolute notation (e.g. /dev/fs/c/foo/bar) */
|
|
|
e1f10b |
/* __fs_npath(): native tool notation (e.g. C:\foo\bar) */
|
|
|
e1f10b |
/* __fs_dpath(): native driver notation (e.g. \Device\Harddisk0\foo\bar */
|
|
|
e1f10b |
/* */
|
|
|
e1f10b |
/* arguments: */
|
|
|
e1f10b |
/* fdat: open at file descriptor */
|
|
|
e1f10b |
/* path: path to resolve, absolute or relative */
|
|
|
e1f10b |
/* options: options to be passed to the internal path resolution */
|
|
|
e1f10b |
/* interface, for instance O_DIRECTORY|O_NOFOLLOW */
|
|
|
e1f10b |
/* buffer: buffer to receive the fully resolved path */
|
|
|
e1f10b |
/* buflen: size of buffer, including null termination. */
|
|
|
e1f10b |
/* */
|
|
|
e1f10b |
/* return value: */
|
|
|
1509ed |
/* zero upon successful resolution and buffer initialization; */
|
|
|
1509ed |
/* otherwise, -1 shall be returned and errno set to indicate the error. */
|
|
|
e1f10b |
/* */
|
|
|
e1f10b |
/* implementation: */
|
|
|
e1f10b |
/* the above interfaces are async-safe, thread-safe, and re-entrant. */
|
|
|
e1f10b |
/* */
|
|
|
e1f10b |
/***************************************************************************/
|
|
|
e1f10b |
|
|
|
e1f10b |
int __fs_rpath(int, const char *, int, char *, size_t);
|
|
|
e1f10b |
int __fs_apath(int, const char *, int, char *, size_t);
|
|
|
e1f10b |
int __fs_npath(int, const char *, int, char *, size_t);
|
|
|
e1f10b |
int __fs_dpath(int, const char *, int, char *, size_t);
|
|
|
e1f10b |
|
|
|
e1f10b |
#ifdef __cplusplus
|
|
|
e1f10b |
}
|
|
|
e1f10b |
#endif
|
|
|
e1f10b |
|
|
|
e1f10b |
#endif
|