about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-06-24 16:59:16 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-07-05 10:08:48 -0300
commit60f574e140edddc1dab88ed85eb494ec359d6408 (patch)
treec7e2c7a39bade47ab142e3d85c1ff4bae7c153e2 /sysdeps/unix/sysv/linux/sys
parent7eae6a91e9b1670330c9f15730082c91c0b1d570 (diff)
downloadglibc-60f574e140edddc1dab88ed85eb494ec359d6408.tar.gz
glibc-60f574e140edddc1dab88ed85eb494ec359d6408.tar.xz
glibc-60f574e140edddc1dab88ed85eb494ec359d6408.zip
linux: Add fspick
It was added on Linux 5.2 (cf3cba4a429be43e5527a3f78859b1bfd9ebc5fb)
that can be used to pick an existing mountpoint into an filesystem
context which can thereafter be used to reconfigure a superblock
with fsconfig syscall.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/mount.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
index ef2c72f31c..e0880f75a5 100644
--- a/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
@@ -163,6 +163,14 @@ enum
 #define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
 #define MOVE_MOUNT_SET_GROUP    0x00000100 /* Set sharing group instead */
 
+
+/* fspick flags.  */
+#define FSPICK_CLOEXEC          0x00000001
+#define FSPICK_SYMLINK_NOFOLLOW 0x00000002
+#define FSPICK_NO_AUTOMOUNT     0x00000004
+#define FSPICK_EMPTY_PATH       0x00000008
+
+
 /* The type of fsconfig call made.   */
 enum fsconfig_command
 {
@@ -219,6 +227,10 @@ extern int move_mount (int __from_dfd, const char *__from_pathname,
 extern int fsconfig (int __fd, unsigned int __cmd, const char *__key,
 		     const void *__value, int __aux) __THROW;
 
+/* Equivalent of fopen for an existing mount point.  */
+extern int fspick (int __dfd, const char *__path, unsigned int __flags)
+  __THROW;
+
 __END_DECLS
 
 #endif /* _SYS_MOUNT_H */