]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: add libmnt_optlist
authorKarel Zak <kzak@redhat.com>
Fri, 24 Jun 2022 16:15:25 +0000 (18:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:53:12 +0000 (12:53 +0100)
commitadd9d4582179eaad69d92ee224cbb4c1c3d96228
tree85e7be2edff4b92b1c718c1bbe84c43ab28d9ba7
parent1eed6d3ba5cfd405b4ec77c7bfd1aca6e1edc21f
libmount: add libmnt_optlist

Now libmount internally keeps mount options as strings or flags. This
commit adds a new container to keep parsed mount options in memory.
We need:

 * the same mount options could be mapped to the different mount options
   maps (for example "nosuid" to classic MS_NOSUID or new MOUNT_ATTR_NOSUID)

 * easy to sync flags and strings (e.g. conversion from MS_NOSUID to
   "nosuid" and vice-versa).

 * double linked list is easy to use in while() when browse all options

 * easy to filter options by specific map (MS_*, userspace, etc.)

 * don't hardcode options maps in options parser, support 3th-party
   maps (for example for extensions like dm-verity, etc.)

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/Makemodule.am
libmount/src/mountP.h
libmount/src/optlist.c [new file with mode: 0644]