implements PLN-0058
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

This commit is contained in:
2026-05-15 06:55:26 +01:00
parent bfe900797f
commit 4d2ea6400d
19 changed files with 499 additions and 281 deletions
@@ -0,0 +1,26 @@
use crate::fs::{FsBackend, FsState};
use crate::os::SystemOS;
pub struct FsFacade<'a> {
pub(in crate::os) os: &'a mut SystemOS,
}
impl<'a> FsFacade<'a> {
pub fn needs_mount(&self) -> bool {
matches!(self.os.fs_state, FsState::Unmounted | FsState::Error(_))
}
pub fn mount(&mut self, backend: Box<dyn FsBackend>) {
self.os.vm_runtime.mount_fs(
&mut self.os.log_service,
&mut self.os.fs,
&mut self.os.fs_state,
backend,
);
}
pub fn unmount(&mut self) {
self.os.fs.unmount();
self.os.fs_state = FsState::Unmounted;
}
}