From: Mike Yuan Date: Mon, 3 Feb 2025 15:46:51 +0000 (+0100) Subject: libmount-util: introduce libmount_parse_fstab() wrapper X-Git-Tag: v258-rc1~1270^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87f7adb8a65ecfd23c849dd28e8dfaaa886c1b92;p=thirdparty%2Fsystemd.git libmount-util: introduce libmount_parse_fstab() wrapper --- diff --git a/src/shared/libmount-util.h b/src/shared/libmount-util.h index a363f7e9b74..0986ed64bf5 100644 --- a/src/shared/libmount-util.h +++ b/src/shared/libmount-util.h @@ -4,6 +4,7 @@ /* This needs to be after sys/mount.h */ #include +#include "fstab-util.h" #include "macro.h" DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct libmnt_table*, mnt_free_table, NULL); @@ -30,6 +31,13 @@ static inline int libmount_parse_with_utab( return libmount_parse_full(NULL, NULL, ret_table, ret_iter); } +static inline int libmount_parse_fstab( + struct libmnt_table **ret_table, + struct libmnt_iter **ret_iter) { + + return libmount_parse_full(fstab_path(), NULL, ret_table, ret_iter); +} + int libmount_is_leaf( struct libmnt_table *table, struct libmnt_fs *fs);