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.
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.
open_tree_from_pidns
Given a pid, enter its mount namespace and acquire a file descriptor for a mount from that namespace.
run_findmnt
Run findmnt with JSON output and parse the result.