commit 564c0d4242c6ae1393a844b1686e6a3713a9de33
parent b552be48aa7d0e090c27abfd5ddb16c0a50e4698
Author: Alexey Yerin <yyp@disroot.org>
Date: Sat, 5 Mar 2022 09:17:11 +0300
os+freebsd: add amode enum from +linux
Signed-off-by: Alexey Yerin <yyp@disroot.org>
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/os/+freebsd/fs.ha b/os/+freebsd/fs.ha
@@ -51,6 +51,14 @@ export fn chroot(target: str) (void | fs::error) = {
};
};
+// Access modes for [[access]].
+export type amode = enum int {
+ F_OK = rt::F_OK,
+ R_OK = rt::R_OK,
+ W_OK = rt::W_OK,
+ X_OK = rt::X_OK,
+};
+
// Returns true if the given mode of access is permissible. The use of this
// function is discouraged as it can allow for a race condition to occur betwen
// testing for the desired access mode and actually using the file should the