diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-24 16:59:17 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-07-05 10:08:48 -0300 |
commit | 78a408ee7ba041fc8d5dbd5f67065b4a982c11e5 (patch) | |
tree | fe301b5f3b5ef797c4cf418b16dfb6b285183277 /sysdeps/unix/sysv/linux/sys | |
parent | 60f574e140edddc1dab88ed85eb494ec359d6408 (diff) | |
download | glibc-78a408ee7ba041fc8d5dbd5f67065b4a982c11e5.tar glibc-78a408ee7ba041fc8d5dbd5f67065b4a982c11e5.tar.gz glibc-78a408ee7ba041fc8d5dbd5f67065b4a982c11e5.tar.bz2 glibc-78a408ee7ba041fc8d5dbd5f67065b4a982c11e5.zip |
linux: Add open_tree
It was added on Linux 5.2 (a07b20004793d8926f78d63eb5980559f7813404)
to return a O_PATH-opened file descriptor to an existing mountpoint.
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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index e0880f75a5..534d05b3f5 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -21,6 +21,7 @@ #ifndef _SYS_MOUNT_H #define _SYS_MOUNT_H 1 +#include <fcntl.h> #include <features.h> #include <sys/ioctl.h> @@ -192,6 +193,10 @@ enum fsconfig_command #define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE }; +/* open_tree flags. */ +#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ +#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */ + __BEGIN_DECLS @@ -231,6 +236,10 @@ extern int fsconfig (int __fd, unsigned int __cmd, const char *__key, extern int fspick (int __dfd, const char *__path, unsigned int __flags) __THROW; +/* Open the mount point FILENAME in directory DFD using FLAGS. */ +extern int open_tree (int __dfd, const char *__filename, unsigned int __flags) + __THROW; + __END_DECLS #endif /* _SYS_MOUNT_H */ |