mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
don't try to unmount anything if nothing was mounted
This commit is contained in:
parent
3bc2860eb0
commit
ec1d1b4444
1 changed files with 5 additions and 0 deletions
|
|
@ -1506,6 +1506,11 @@ fn wrapped_main() -> ! {
|
|||
xous::return_scalar2(msg.sender, 0, 0).ok();
|
||||
}),
|
||||
Opcode::TryUnmount => {
|
||||
// only proceed if anything was mounted
|
||||
if basis_cache.basis_list().len() == 0 {
|
||||
xous::return_scalar(msg.sender, 1).unwrap(); // nothing to do, nothing mounted. success!
|
||||
continue;
|
||||
}
|
||||
basis_cache.sync(&mut pddb_os, None).expect("can't sync for unmount");
|
||||
// unmount all the open basis first
|
||||
let mut mounted_bases = basis_cache.basis_list();
|
||||
|
|
|
|||
Loading…
Reference in a new issue