fs: support openat/fchmodat/mkfifoat/fstatat/...at api

Refs to:
https://linux.die.net/man/2/openat

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1
2023-02-04 09:00:49 +08:00
committed by Xiang Xiao
parent 7bbabc74fb
commit 14f8a6c2dd
25 changed files with 1230 additions and 0 deletions
+8
View File
@@ -171,15 +171,23 @@ extern "C"
#endif
int mkdir(FAR const char *pathname, mode_t mode);
int mkdirat(int dirfd, FAR const char *pathname, mode_t mode);
int mkfifo(FAR const char *pathname, mode_t mode);
int mkfifoat(int dirfd, FAR const char *pathname, mode_t mode);
int mknod(FAR const char *path, mode_t mode, dev_t dev);
int mknodat(int dirfd, FAR const char *path, mode_t mode, dev_t dev);
int stat(FAR const char *path, FAR struct stat *buf);
int lstat(FAR const char *path, FAR struct stat *buf);
int fstat(int fd, FAR struct stat *buf);
int fstatat(int dirfd, FAR const char *path, FAR struct stat *buf,
int flags);
int chmod(FAR const char *path, mode_t mode);
int lchmod(FAR const char *path, mode_t mode);
int fchmod(int fd, mode_t mode);
int fchmodat(int dirfd, FAR const char *path, mode_t mode, int flags);
int utimens(FAR const char *path, const struct timespec times[2]);
int utimensat(int dirfd, FAR const char *path,
const struct timespec times[2], int flags);
int lutimens(FAR const char *path, const struct timespec times[2]);
int futimens(int fd, const struct timespec times[2]);
+2
View File
@@ -373,6 +373,8 @@ int setitimer(int which, FAR const struct itimerval *value,
int utimes(FAR const char *path, const struct timeval times[2]);
int lutimes(FAR const char *path, const struct timeval times[2]);
int futimesat(int dirfd, FAR const char *path,
const struct timeval times[2]);
/****************************************************************************
* Name: futimes