[hurd,commited] hurd: Add support for AT_NO_AUTOMOUNT

Message ID 20210810151803.46748-1-samuel.thibault@ens-lyon.org
State Committed, archived
Headers
Series [hurd,commited] hurd: Add support for AT_NO_AUTOMOUNT |

Checks

Context Check Description
dj/TryBot-apply_patch fail Patch failed to apply to master at the time it was sent
dj/TryBot-32bit fail Patch series failed to apply

Commit Message

Samuel Thibault Aug. 10, 2021, 3:18 p.m. UTC
  ---
 hurd/hurd/fd.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
index 7165a8f1fc..111f680670 100644
--- a/hurd/hurd/fd.h
+++ b/hurd/hurd/fd.h
@@ -295,9 +295,15 @@  __hurd_at_flags (int *at_flags, int *flags)
 
   *flags |= (*at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0;
   *at_flags &= ~AT_SYMLINK_NOFOLLOW;
+
   if (*at_flags & AT_SYMLINK_FOLLOW)
     *flags &= ~O_NOLINK;
   *at_flags &= ~AT_SYMLINK_FOLLOW;
+
+  if (*at_flags & AT_NO_AUTOMOUNT)
+    *flags |= O_NOTRANS;
+  *at_flags &= ~AT_NO_AUTOMOUNT;
+
   if (*at_flags != 0)
     return EINVAL;