]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: add support for statmount()
authorKarel Zak <kzak@redhat.com>
Wed, 14 Aug 2024 15:10:45 +0000 (17:10 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jan 2025 12:57:42 +0000 (13:57 +0100)
commit0affb7ae7b2ffdc66daab293e0f8289a133f3a9e
tree556dcabbd1b5bda0e34b3cd3e4ed705be1004237
parentff3f99c62ecad32925545cf7ae617231e17af19d
libmount: add support for statmount()

* introduce libmnt_statmnt object to store statmount mask and buffer
  (etc.)

* add API for libmnt_fs to retrieve data from the kernel using
  statmount()

* support on-demand statmount() from old mnt_fs_get_...() functions

* allow libmnt_statmnt to be shared and reused between libmnt_fs
  instances

* allow libmnt_statmnt to be assigned and used for filesystems in the
  table (assign libmnt_statmnt to the table to make it usable for all
  filesystems).

* allow temporary disabling of fetching data from the kernel to avoid
  unwanted recursion in certain use-cases

* support namespaces for statmount() based on the libmnt_fs namespace
  ID setting

* allow user-defined statmount masks to overwrite the default

* add a sample program

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/docs/libmount-sections.txt
libmount/meson.build
libmount/samples/Makemodule.am
libmount/samples/statmount.c [new file with mode: 0644]
libmount/src/Makemodule.am
libmount/src/fs.c
libmount/src/fs_statmount.c [new file with mode: 0644]
libmount/src/libmount.h.in
libmount/src/libmount.sym
libmount/src/mountP.h
libmount/src/tab.c