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

Function mount

init/src/main.rs:79–102  ·  view source on GitHub ↗
(
    path: &str,
    bin: &[u8],
    flags: u8,
    stdout: CommHandle)

Source from the content-addressed store, hash-verified

77
78
79fn mount(
80 path: &str,
81 bin: &[u8],
82 flags: u8,
83 stdout: CommHandle) {
84
85 fprintln!(&stdout, "[init] Starting program mounted at {} with flags {}", path, flags);
86
87 // Make a new Rendezvous for the process input
88 let (input, input2) = syscalls::new_rendezvous().unwrap();
89
90 // Start the process
91 syscalls::exec(
92 bin,
93 flags,
94 input,
95 stdout,
96 VFS::shared(),
97 Vec::new(),
98 "").expect("[init] Couldn't start program");
99
100 // Mount in filesystem
101 syscalls::mount(path, input2).expect("[init] Couldn't mount path");
102}
103
104#[no_mangle]
105fn main() {

Callers 1

mainFunction · 0.70

Calls 2

execFunction · 0.85
new_rendezvousFunction · 0.50

Tested by

no test coverage detected