]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/fstab-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
9 bool fstab_is_extrinsic(const char *mount
, const char *opts
);
10 int fstab_is_mount_point(const char *mount
);
11 int fstab_has_fstype(const char *fstype
);
13 int fstab_filter_options(const char *opts
, const char *names
, const char **namefound
, char **value
, char **filtered
);
15 int fstab_extract_values(const char *opts
, const char *name
, char ***values
);
17 static inline bool fstab_test_option(const char *opts
, const char *names
) {
18 return !!fstab_filter_options(opts
, names
, NULL
, NULL
, NULL
);
21 int fstab_find_pri(const char *options
, int *ret
);
23 static inline bool fstab_test_yes_no_option(const char *opts
, const char *yes_no
) {
26 /* If first name given is last, return 1.
27 * If second name given is last or neither is found, return 0. */
29 assert_se(fstab_filter_options(opts
, yes_no
, &opt
, NULL
, NULL
) >= 0);
34 char *fstab_node_to_udev_node(const char *p
);
36 static inline const char* fstab_path(void) {
37 return secure_getenv("SYSTEMD_FSTAB") ?: "/etc/fstab";