Skip to main content

Module mount_info

Module mount_info 

Source
Expand description

Unified mount enumeration via statmount(2) with /proc/self/mountinfo fallback. Unified mount enumeration API.

Uses statmount(2) / listmount(2) on Linux >= 6.8 for direct kernel mount queries, falling back to /proc/self/mountinfo text parsing on older kernels. On kernels where statmount is available but SB_SOURCE is not (e.g. RHEL 10.2 kernel 6.12), the statmount results are enriched with source and options from /proc/self/mountinfo.

Structs§

MountEntry
A single mount point with fields matching /proc/self/mountinfo columns.

Functions§

find_mount_for_path
Find the mount entry whose mount_point is the longest prefix of path.
list_mounts
Enumerate all mounts visible to the current process.
list_mounts_proc
Parse /proc/self/mountinfo into MountEntry values.