#include "errno-util.h"
#include "macro.h"
-typedef enum MountAttrPropagationType {
- MOUNT_ATTR_PROPAGATION_INHERIT, /* no special MS_* propagation flags */
- MOUNT_ATTR_PROPAGATION_PRIVATE, /* MS_PRIVATE */
- MOUNT_ATTR_PROPAGATION_DEPENDENT, /* MS_SLAVE */
- MOUNT_ATTR_PROPAGATION_SHARED, /* MS_SHARE */
-
- _MOUNT_ATTR_PROPAGATION_TYPE_MAX,
- _MOUNT_ATTR_PROPAGATION_TYPE_INVALID = -EINVAL,
-} MountAttrPropagationType;
-
-const char* mount_attr_propagation_type_to_string(MountAttrPropagationType t) _const_;
-MountAttrPropagationType mount_attr_propagation_type_from_string(const char *s) _pure_;
-unsigned int mount_attr_propagation_type_to_flag(MountAttrPropagationType t);
-
int repeat_unmount(const char *path, int flags);
int umount_recursive(const char *target, int flags);
int bind_remount_one_with_mountinfo(const char *path, unsigned long new_flags, unsigned long flags_mask, FILE *proc_self_mountinfo);
-int mount_switch_root(const char *path, MountAttrPropagationType type);
+int mount_switch_root(const char *path, unsigned long mount_propagation_flag);
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(FILE*, endmntent, NULL);
#define _cleanup_endmntent_ _cleanup_(endmntentp)
int remount_idmap(const char *p, uid_t uid_shift, uid_t uid_range, uid_t owner, RemountIdmapping idmapping);
+int remount_and_move_sub_mounts(
+ const char *what,
+ const char *where,
+ const char *type,
+ unsigned long flags,
+ const char *options);
+int remount_sysfs(const char *where);
+
/* Creates a mount point (not parents) based on the source path or stat - ie, a file or a directory */
int make_mount_point_inode_from_stat(const struct stat *st, const char *dest, mode_t mode);
int make_mount_point_inode_from_path(const char *source, const char *dest, mode_t mode);