diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-01-31 10:04:57 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-24 16:03:38 -0300 |
commit | 5b41b2659d35b72636ab50a28d6815cad9c22a66 (patch) | |
tree | f205af8d360c19eac950a5fd6a94d262a9697cac /sysdeps/unix/sysv/linux/sys/mount.h | |
parent | b4deb7beb8c977f79642a6a839c0475e1ce3a209 (diff) | |
download | glibc-5b41b2659d35b72636ab50a28d6815cad9c22a66.zip glibc-5b41b2659d35b72636ab50a28d6815cad9c22a66.tar.gz glibc-5b41b2659d35b72636ab50a28d6815cad9c22a66.tar.bz2 |
linux: Add move_mount
It was added on Linux 5.2 (2db154b3ea8e14b04fee23e3fdfd5e9d17fbc6ae)
as way t move a mount from one place to another and, in the next
commit, allow to attach an unattached mount tree.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys/mount.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/sys/mount.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index 6d55c55..50ec65c 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -154,6 +154,16 @@ enum #define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks. */ +/* move_mount flags. */ +#define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */ +#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */ +#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */ +#define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */ +#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */ +#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */ +#define MOVE_MOUNT_SET_GROUP 0x00000100 /* Set sharing group instead */ + + __BEGIN_DECLS /* Mount a filesystem. */ @@ -176,6 +186,13 @@ extern int fsopen (const char *__fs_name, unsigned int __flags) __THROW; extern int fsmount (int __fd, unsigned int __flags, unsigned int __ms_flags) __THROW; +/* Add the mounted FROM_DFD referenced by FROM_PATHNAME filesystem returned + by fsmount in the hierarchy in the place TO_DFD reference by TO_PATHNAME + using FLAGS. */ +extern int move_mount (int __from_dfd, const char *__from_pathname, + int __to_dfd, const char *__to_pathname, + unsigned int flags) __THROW; + __END_DECLS #endif /* _SYS_MOUNT_H */ |