summaryrefslogtreecommitdiff
path: root/internal/syscallcompat
diff options
context:
space:
mode:
authorJakob Unterwurzacher2022-01-22 12:28:27 +0100
committerJakob Unterwurzacher2022-01-22 12:28:27 +0100
commitb7cac4ffd07733ab6bcd0d33345de3306a8a5a59 (patch)
treeac8d9f593bcdce3abd7a8bb4d62e4ca7e6b986c2 /internal/syscallcompat
parent3ca2b1983dbab14e3769efd126098cbca6fb2ffd (diff)
fusefrontend: support RENAME_WHITEOUT, RENAME_EXCHANGE
Both new internal test and xfstests generic/013 are happy. https://github.com/rfjakob/gocryptfs/issues/641
Diffstat (limited to 'internal/syscallcompat')
-rw-r--r--internal/syscallcompat/sys_darwin.go4
-rw-r--r--internal/syscallcompat/sys_linux.go4
2 files changed, 6 insertions, 2 deletions
diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go
index de795a4..7b8773c 100644
--- a/internal/syscallcompat/sys_darwin.go
+++ b/internal/syscallcompat/sys_darwin.go
@@ -21,8 +21,10 @@ const (
// O_PATH is only defined on Linux
O_PATH = 0
- // RENAME_NOREPLACE is only defined on Linux
+ // Only defined on Linux
RENAME_NOREPLACE = 0
+ RENAME_WHITEOUT = 0
+ RENAME_EXCHANGE = 0
// KAUTH_UID_NONE and KAUTH_GID_NONE are special values to
// revert permissions to the process credentials.
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index 961d1c9..a64b27e 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -28,8 +28,10 @@ const (
// O_PATH is only defined on Linux
O_PATH = unix.O_PATH
- // RENAME_NOREPLACE is only defined on Linux
+ // Only defined on Linux
RENAME_NOREPLACE = unix.RENAME_NOREPLACE
+ RENAME_WHITEOUT = unix.RENAME_WHITEOUT
+ RENAME_EXCHANGE = unix.RENAME_EXCHANGE
)
var preallocWarn sync.Once