From 6a594dcefc1d1e36db22ea32adf1ee99e8037ed0 Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 10 Nov 2024 08:30:30 -0600 Subject: [PATCH] Set CLI args for PIDs 0 1 and 2 on proc_man start --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 4874daa..6e51da5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,8 +79,11 @@ fn main() { let proc_man_pid = run_initrd_proc(&initrd, "bin/proc_man"); let proc_man_client = proc_man_rpc::Client::new(proc_man_pid); proc_man_client.new_proc(0, None).unwrap(); + proc_man_client.set_cli_args(0, vec!["init".into()]).unwrap(); proc_man_client.new_proc(1, Some(0)).unwrap(); + proc_man_client.set_cli_args(1, vec!["bin/syslog".into()]).unwrap(); proc_man_client.new_proc(2, Some(0)).unwrap(); + proc_man_client.set_cli_args(2, vec!["bin/proc_man".into()]).unwrap(); let vfs_pid = run_initrd_proc(&initrd, "bin/vfs"); let vfs_client = vfs_rpc::Client::new(vfs_pid); run_initrd_proc(&initrd, "bin/devfs"); @@ -157,7 +160,7 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 { 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(); + proc_man_client.set_cli_args(pid, vec![path.into()]).unwrap(); } syscalls::wake_new(pid).unwrap(); pid