bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] renameatu: handle ENOSYS from renameatx_np


From: Pádraig Brady
Subject: [PATCH] renameatu: handle ENOSYS from renameatx_np
Date: Tue, 2 Apr 2024 13:32:28 +0100

* lib/renameatu.c(): Fall back to renameat() without RENAME_EXCL
if "Function not implemented" is returned.  This was seen with macFUSE.
Reported at https://github.com/coreutils/coreutils/issues/79
---
 ChangeLog       | 7 +++++++
 lib/renameatu.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5c51c94166..1fda03418b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-04-02  Pádraig Brady  <P@draigBrady.com>
+
+       renameatu: handle ENOSYS from renameatx_np
+       * lib/renameatu.c(): Fall back to renameat() without RENAME_EXCL
+       if "Function not implemented" is returned.  This was seen with macFUSE.
+       Reported at https://github.com/coreutils/coreutils/issues/79
+
 2024-04-02  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool: Remove unused variables.
diff --git a/lib/renameatu.c b/lib/renameatu.c
index 6893232516..815e3e0da9 100644
--- a/lib/renameatu.c
+++ b/lib/renameatu.c
@@ -78,7 +78,7 @@ renameat2ish (int fd1, char const *src, int fd2, char const 
*dst,
   if (flags)
     {
       int r = renameatx_np (fd1, src, fd2, dst, RENAME_EXCL);
-      if (r == 0 || errno != ENOTSUP)
+      if (r == 0 || (errno != ENOTSUP && errno != ENOSYS))
         return r;
     }
 # endif
-- 
2.44.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]