fs: Support O_NOFOLLOW flag

https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/functions/open.html:
O_NOFOLLOW
If path names a symbolic link, fail and set errno to [ELOOP].

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-01-15 00:57:09 +08:00
committed by archer
parent a32124879d
commit b1899ffbfd
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -53,6 +53,7 @@
#define O_DIRECT (1 << 9) /* Avoid caching, write directly to hardware */
#define O_CLOEXEC (1 << 10) /* Close on execute */
#define O_DIRECTORY (1 << 11) /* Must be a directory */
#define O_NOFOLLOW (1 << 12) /* Don't follow links */
/* Unsupported, but required open flags */