prepare_mount

Function prepare_mount 

Source
pub fn prepare_mount(mnt_fd: OwnedFd) -> Result<impl AsFd>
Expand description

Prepares a mounted filesystem for further use.

On pre-6.15 kernels, this mounts the filesystem to a temporary directory and returns an O_PATH file descriptor to it. The temporary mount is automatically cleaned up when the returned value is dropped.