]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/mount-util.h
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / src / basic / mount-util.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
4349cd7c
LP
2#pragma once
3
4e036b7a 4#include <fcntl.h>
4349cd7c 5#include <mntent.h>
4e036b7a 6#include <stdbool.h>
11c3a366 7#include <stdio.h>
4e036b7a
LP
8#include <sys/stat.h>
9#include <sys/types.h>
10
11c3a366 11#include "macro.h"
93cc7779 12#include "missing.h"
4349cd7c 13
cbfb8679
LP
14int name_to_handle_at_loop(int fd, const char *path, struct file_handle **ret_handle, int *ret_mnt_id, int flags);
15
c2a986d5
LP
16int path_get_mnt_id(const char *path, int *ret);
17
4349cd7c 18int fd_is_mount_point(int fd, const char *filename, int flags);
e1873695 19int path_is_mount_point(const char *path, const char *root, int flags);
4349cd7c 20
3f2c0bec
LP
21int repeat_unmount(const char *path, int flags);
22
4349cd7c 23int umount_recursive(const char *target, int flags);
6b7c9f8b 24int bind_remount_recursive(const char *prefix, bool ro, char **blacklist);
ac9de0b3 25int bind_remount_recursive_with_mountinfo(const char *prefix, bool ro, char **blacklist, FILE *proc_self_mountinfo);
4349cd7c
LP
26
27int mount_move_root(const char *path);
28
29DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, endmntent);
30#define _cleanup_endmntent_ _cleanup_(endmntentp)
4e036b7a
LP
31
32bool fstype_is_network(const char *fstype);
e2be442e 33bool fstype_is_api_vfs(const char *fstype);
896f937f 34bool fstype_is_ro(const char *fsype);
154d2269 35bool fstype_can_discard(const char *fstype);
2d3a5a73 36bool fstype_can_uid_gid(const char *fstype);
4e036b7a 37
c4b41707
AP
38const char* mode_to_inaccessible_node(mode_t mode);
39
60e76d48
ZJS
40int mount_verbose(
41 int error_log_level,
42 const char *what,
43 const char *where,
44 const char *type,
45 unsigned long flags,
46 const char *options);
47int umount_verbose(const char *where);
83555251
LP
48
49const char *mount_propagation_flags_to_string(unsigned long flags);
c7383828 50int mount_propagation_flags_from_string(const char *name, unsigned long *ret);
9e7f941a
YW
51
52int mount_option_mangle(
53 const char *options,
54 unsigned long mount_flags,
55 unsigned long *ret_mount_flags,
56 char **ret_remaining_options);