Launch a test process using std APIs
This commit is contained in:
parent
cc29c1edef
commit
1a218a9978
@ -4,6 +4,7 @@
|
|||||||
use std::os::mikros::loader::Loader;
|
use std::os::mikros::loader::Loader;
|
||||||
use std::os::mikros::syscalls::{get_initrd, new_process};
|
use std::os::mikros::syscalls::{get_initrd, new_process};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::process::Command;
|
||||||
use tar_no_std::TarArchiveRef;
|
use tar_no_std::TarArchiveRef;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
@ -29,8 +30,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("[INIT] Mounted initrd as root");
|
println!("[INIT] Mounted initrd as root");
|
||||||
println!("/test_file.txt:");
|
Command::new("/bin/load_test").spawn().unwrap();
|
||||||
print!("{}", std::fs::read_to_string("/test_file.txt").unwrap())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
|
fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
|
||||||
|
Loading…
Reference in New Issue
Block a user