Pass name of process as first argument
This commit is contained in:
parent
b372f96ce6
commit
511b948482
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -289,7 +289,6 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"postcard",
|
"postcard",
|
||||||
"serde",
|
|
||||||
"syslog_structs",
|
"syslog_structs",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#![feature(int_roundings)]
|
#![feature(int_roundings)]
|
||||||
#![deny(unsafe_op_in_unsafe_fn)]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
|
|
||||||
|
use std::ffi::CString;
|
||||||
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;
|
||||||
@ -56,5 +57,6 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
|
|||||||
.expect(&format!("{} not found", path))
|
.expect(&format!("{} not found", path))
|
||||||
.data();
|
.data();
|
||||||
let (space, entry) = Loader::load(&proc);
|
let (space, entry) = Loader::load(&proc);
|
||||||
new_process(entry as _, space).unwrap()
|
let path_arg = CString::new(path).unwrap();
|
||||||
|
new_process(entry as _, space, &[path_arg.as_bytes_with_nul()]).unwrap()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user