Function nix::mount::unmount

source · []
pub fn unmount<P>(mountpoint: &P, flags: MntFlags) -> Result<()> where
    P: ?Sized + NixPath
Expand description

Unmount the file system mounted at mountpoint.

Useful flags include

  • MNT_FORCE - Unmount even if still in use.
  • MNT_BYFSID - mountpoint is not a path, but a file system ID encoded as FSID:val0:val1, where val0 and val1 are the contents of the fsid_t val[] array in decimal. The file system that has the specified file system ID will be unmounted. See statfs to determine the fsid.