]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/fstab-util.h
59d909d44f6112fab83813728c8a720815247cf4
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
6 bool fstab_enabled_full(int enabled
);
7 static inline bool fstab_enabled(void) {
8 return fstab_enabled_full(-1);
10 static inline bool fstab_set_enabled(bool enabled
) {
11 return fstab_enabled_full(enabled
);
14 bool fstab_is_extrinsic(const char *mount
, const char *opts
);
15 int fstab_has_fstype(const char *fstype
);
17 int fstab_is_mount_point_full(const char *where
, const char *path
);
18 static inline int fstab_is_mount_point(const char *where
) {
19 return fstab_is_mount_point_full(where
, NULL
);
21 static inline int fstab_has_node(const char *path
) {
22 return fstab_is_mount_point_full(NULL
, path
);
25 int fstab_has_mount_point_prefix_strv(char * const *prefixes
);
27 int fstab_filter_options(
30 const char **ret_namefound
,
34 static inline bool fstab_test_option(const char *opts
, const char *names
) {
35 return fstab_filter_options(opts
, names
, NULL
, NULL
, NULL
, NULL
);
37 static inline bool fstab_test_yes_no_option(const char *opts
, const char *yes_no
) {
38 const char *opt_found
;
40 /* If first name given is last, return 1.
41 * If second name given is last or neither is found, return 0. */
43 assert_se(fstab_filter_options(opts
, yes_no
, &opt_found
, NULL
, NULL
, NULL
) >= 0);
45 return opt_found
== yes_no
;
47 int fstab_find_pri(const char *opts
, int *ret
);
49 char* fstab_node_to_udev_node(const char *p
);
51 const char* fstab_path(void);
53 bool fstab_is_bind(const char *options
, const char *fstype
);