From 60f574e140edddc1dab88ed85eb494ec359d6408 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 24 Jun 2022 16:59:16 -0300 Subject: 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 --- sysdeps/unix/sysv/linux/sys/mount.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sysdeps/unix/sysv/linux/sys/mount.h') 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 */ -- cgit v1.2.3-70-g09d2