1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

libmount-util: introduce libmount_parse_fstab() wrapper

This commit is contained in:
Mike Yuan 2025-02-03 16:46:51 +01:00
parent 2f3d986053
commit 87f7adb8a6
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -4,6 +4,7 @@
/* This needs to be after sys/mount.h */
#include <libmount.h>
#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);