Change to using proc_man for CLI arguments

This commit is contained in:
pjht 2024-11-09 21:42:54 -06:00
parent 6e73b15b68
commit 02c1f441ae
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -154,8 +154,11 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
.unwrap_or_else(|| panic!("{} not found", path))
.data();
let (space, entry) = Loader::load(proc);
let path_arg = CString::new(path).unwrap();
let pid = new_process(entry as _, space, &[path_arg.as_bytes_with_nul()]).unwrap();
let pid = new_process(entry as _, space).unwrap();
if let Some(proc_man_pid) = syscalls::try_get_registered(3) {
let proc_man_client = proc_man_rpc::Client::new(proc_man_pid);
proc_man_client.set_cli_args(pid, vec![path.to_string().parse().unwrap()]).unwrap();
}
syscalls::wake_new(pid).unwrap();
pid
}