]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/mount-util.h
06fddacf16d03b60350abcc1cfefa1aa3528d658
[thirdparty/systemd.git] / src / shared / mount-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <mntent.h>
5 #include <stdio.h>
6
7 #include "macro.h"
8
9 int repeat_unmount(const char *path, int flags);
10 int umount_recursive(const char *target, int flags);
11 int bind_remount_recursive(const char *prefix, unsigned long new_flags, unsigned long flags_mask, char **blacklist);
12 int bind_remount_recursive_with_mountinfo(const char *prefix, unsigned long new_flags, unsigned long flags_mask, char **blacklist, FILE *proc_self_mountinfo);
13 int bind_remount_one_with_mountinfo(const char *path, unsigned long new_flags, unsigned long flags_mask, FILE *proc_self_mountinfo);
14
15 int mount_move_root(const char *path);
16
17 DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, endmntent);
18 #define _cleanup_endmntent_ _cleanup_(endmntentp)
19
20 int mount_verbose(
21 int error_log_level,
22 const char *what,
23 const char *where,
24 const char *type,
25 unsigned long flags,
26 const char *options);
27 int umount_verbose(const char *where);
28
29 int mount_option_mangle(
30 const char *options,
31 unsigned long mount_flags,
32 unsigned long *ret_mount_flags,
33 char **ret_remaining_options);
34
35 int mode_to_inaccessible_node(const char *runtime_dir, mode_t mode, char **dest);