]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (optlist) add function to access option's map
authorKarel Zak <kzak@redhat.com>
Tue, 23 Aug 2022 11:42:16 +0000 (13:42 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/mountP.h
libmount/src/optlist.c

index 95a5d10bb55f48ecb144692b4dd36736f9fe8608..902f511289c47c695ac3619348b530ce202d7f8e 100644 (file)
@@ -543,6 +543,8 @@ extern int mnt_optlist_merge_opts(struct libmnt_optlist *ls);
 extern int mnt_opt_has_value(struct libmnt_opt *opt);
 extern const char *mnt_opt_get_value(struct libmnt_opt *opt);
 extern const char *mnt_opt_get_name(struct libmnt_opt *opt);
+extern const struct libmnt_optmap *mnt_opt_get_map(struct libmnt_opt *opt);
+extern const struct libmnt_optmap *mnt_opt_get_mapent(struct libmnt_opt *opt);
 extern int mnt_opt_set_external(struct libmnt_opt *opt, int enable);
 extern int mnt_opt_set_value(struct libmnt_opt *opt, const char *str);
 extern int mnt_opt_set_u64value(struct libmnt_opt *opt, uint64_t num);
index b3cc90c334bd8492fdb5ba6aa9880c0aa5ddf98c..270baa4f6c115875a3854489c807888fd052f556 100644 (file)
@@ -832,6 +832,16 @@ const char *mnt_opt_get_name(struct libmnt_opt *opt)
        return opt->name;
 }
 
+const struct libmnt_optmap *mnt_opt_get_map(struct libmnt_opt *opt)
+{
+       return opt->map;
+}
+
+const struct libmnt_optmap *mnt_opt_get_mapent(struct libmnt_opt *opt)
+{
+       return opt->ent;
+}
+
 int mnt_opt_set_value(struct libmnt_opt *opt, const char *str)
 {
        return strdup_to_struct_member(opt, value, str);