MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / umount

Method umount

kernel/src/vfs.rs:43–53  ·  view source on GitHub ↗

Remove a mount point from the VFS

(&mut self,
                  path: &str)

Source from the content-addressed store, hash-verified

41
42 /// Remove a mount point from the VFS
43 pub fn umount(&mut self,
44 path: &str) -> Result<(),()> {
45 let mut mounts = self.0.write();
46 if let Some(index) = mounts.iter().position(
47 |mount_path| mount_path.0 == path) {
48 // Found an index
49 _ = mounts.swap_remove(index);
50 return Ok(());
51 }
52 Err(())
53 }
54
55 /// Open a path, returning a handle to read/write and the
56 /// length of the string matched.

Callers 2

sys_execFunction · 0.80
sys_umountFunction · 0.80

Calls 2

iterMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected