Skip to main content

Crate bootc_internal_mount

Crate bootc_internal_mount 

Source
Expand description

Helpers for interacting with mountpoints

Modulesยง

tempmount
Temporary mount management with automatic cleanup.

Structsยง

Filesystem
Deserialized information about a mounted filesystem from findmnt.
Findmnt
Deserialized output of findmnt --json.

Constantsยง

PID1
Well known identifier for pid 1

Functionsยง

bind_mount_from_pidns
Create a bind mount from the mount namespace of the target pid into our mount namespace.
ensure_mirrored_host_mount
If the target path is not already mirrored from the host (e.g. via -v /dev:/dev) then recursively mount it.
find_mount_target_by_source
Find the mount target of a given source device in the current mount namespace. Returns Ok(None) if the device is not mounted.
find_source_mount_target ๐Ÿ”’
findmnt_filesystem ๐Ÿ”’
inspect_filesystem
Inspect a target which must be a mountpoint root - it is an error if the target is not the mount root.
inspect_filesystem_by_uuid
Inspect a filesystem by partition UUID
inspect_filesystem_of_dir
Inspect a target which must be a mountpoint root - it is an error if the target is not the mount root.
is_mounted_in_pid1_mountns
Check if a specified device contains an already mounted filesystem in the root mount namespace.
is_same_as_host
If the fsid of the passed path matches the fsid of the same path rooted at /proc/1/root, it is assumed that these are indeed the same mounted filesystem between container and host. Path should be absolute.
is_source_mounted
Recursively check a given filesystem to see if it contains an already mounted source.
mount
Mount a device to the target path.
mount_typed
Mount a device with an explicit filesystem type.
open_tree_from_pidns
Given a pid, enter its mount namespace and acquire a file descriptor for a mount from that namespace.
pid1_mounts ๐Ÿ”’
Return the list of mounts visible in pid 1โ€™s mount namespace, as reported by findmnt.
run_findmnt
Run findmnt with JSON output and parse the result.