libc: Implement umask function

Here is the spec:
https://pubs.opengroup.org/onlinepubs/009695399/functions/umask.html
Note: The simple implementaton is enough since
      NuttX doesn't really support the permission

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-09-14 14:20:13 +08:00
committed by Matias N
parent e681396d35
commit 027e2eed28
3 changed files with 60 additions and 1 deletions
+2
View File
@@ -168,6 +168,8 @@ int fstat(int fd, FAR struct stat *buf);
int chmod(FAR const char *path, mode_t mode);
int fchmod(int fd, mode_t mode);
mode_t umask(mode_t mask);
#undef EXTERN
#if defined(__cplusplus)
}