Impl AT_SYMLINK_NOFOLLOW and AT_EMPTY_PATH

AT_SYMLINK_NOFOLLOW acts on the symlink itself rather than following it.

AT_EMPTY_PATH acts on the directory if path is empty.

Currently, this is implemented in fstatat itself but the code is general
enough to be refactored once we get the other *at functions. It could
likely just live in openat itself.
This commit is contained in:
Josh Megnauth
2025-09-10 01:49:21 -04:00
parent e1fa1ee7b7
commit 28901b1b62
3 changed files with 101 additions and 28 deletions
+2
View File
@@ -30,3 +30,5 @@ pub const O_NDELAY: c_int = O_NONBLOCK;
// Flags for capability based "at" functions
pub const AT_FDCWD: c_int = -100;
pub const AT_SYMLINK_NOFOLLOW: c_int = 0x0200;
pub const AT_EMPTY_PATH: c_int = 0x4000;