[PATCH v2 07/13] Add OPEN_TREE_NAMESPACE and FSMOUNT_NAMESPACE to sys/mount.h

Adhemerval Zanella <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
Add OPEN_TREE_NAMESPACE (commit 9b8a0ba68246a61d903ce62c35c303b1501df28b,
Linux 7.0) and FSMOUNT_NAMESPACE (commit
5e8969bd192712419aae511dd5ba26855c2c78db, Linux 7.1).
---
 sysdeps/unix/sysv/linux/sys/mount.h         | 6 ++++++
 sysdeps/unix/sysv/linux/tst-mount-consts.py | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
index 0c5ebed33ae..632c3a59d84 100644
--- a/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
@@ -189,6 +189,8 @@ enum
 
 /* fsmount flags.  */
 #define FSMOUNT_CLOEXEC         0x00000001
+#define FSMOUNT_NAMESPACE       0x00000002 /* Create the mount in a new mount
+					      namespace.  */
 
 /* mount attributes used on fsmount.  */
 #define MOUNT_ATTR_RDONLY       0x00000001 /* Mount read-only.  */
@@ -267,6 +269,10 @@ enum fsconfig_command
 #ifndef OPEN_TREE_CLONE
 # define OPEN_TREE_CLONE    1 /* Clone the target tree and attach the clone */
 #endif
+#ifndef OPEN_TREE_NAMESPACE
+# define OPEN_TREE_NAMESPACE 2 /* Clone the target tree into a new mount
+				  namespace */
+#endif
 #ifndef O_CLOEXEC
 # include <bits/cloexec.h>
 # define O_CLOEXEC __O_CLOEXEC
diff --git a/sysdeps/unix/sysv/linux/tst-mount-consts.py b/sysdeps/unix/sysv/linux/tst-mount-consts.py
index 423a76c282e..082ad51735f 100755
--- a/sysdeps/unix/sysv/linux/tst-mount-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-mount-consts.py
@@ -39,10 +39,10 @@ def main():
         sys.exit (77)
 
     linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
-    # Constants in glibc were updated to match Linux v6.17.  When glibc
+    # Constants in glibc were updated to match Linux v7.1.  When glibc
     # constants are updated this value should be updated to match the
     # released kernel version from which the constants were taken.
-    linux_version_glibc = (6, 17)
+    linux_version_glibc = (7, 1)
     def check(cte, exclude=None):
         return glibcextract.compare_macro_consts(
                 '#include <sys/mount.h>\n',
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.