(
path: &str,
bin: &[u8],
flags: u8,
stdout: CommHandle)
| 77 | |
| 78 | |
| 79 | fn 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] |
| 105 | fn main() { |
no test coverage detected