fs: Add utimens and lutimens

https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-08-09 16:08:20 +08:00 committed by Gustavo Henrique Nihei
parent 50c49da078
commit 6c61d032db
7 changed files with 115 additions and 20 deletions

View file

@ -178,6 +178,8 @@ int fstat(int fd, FAR struct stat *buf);
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 utimens(FAR const char *path, const struct timespec times[2]);
int lutimens(FAR const char *path, const struct timespec times[2]);
int futimens(int fd, const struct timespec times[2]);
mode_t umask(mode_t mask);

View file

@ -254,8 +254,8 @@ SYSCALL_LOOKUP(fchmod, 2)
SYSCALL_LOOKUP(chown, 3)
SYSCALL_LOOKUP(lchown, 3)
SYSCALL_LOOKUP(fchown, 3)
SYSCALL_LOOKUP(utimes, 2)
SYSCALL_LOOKUP(lutimes, 2)
SYSCALL_LOOKUP(utimens, 2)
SYSCALL_LOOKUP(lutimens, 2)
SYSCALL_LOOKUP(futimens, 2)
#if defined(CONFIG_FS_RAMMAP)