Function lrs::fs::unmount

Unmounts a filesystem.

Syntax

fn unmount<P>(dst: P, flags: UnmountFlags) -> Result<(), Errno>
    where P: ToCString,

Arguments

NameDescription
dst

The path of the mountpoint to be unmounted.

flags

The flags to be used to unmount the filesystem.

Remarks

See lrs::fs::flags for pre-defined unmount flags. If the path is relative, it is interpreted relative to the current working directory.

Examples

The example in mount shows how to bind-mount a directory a at the path b. The following example unmounts b.

unmount("b", UNMOUNT_LAZY).unwrap();

See also