diff --git a/Cargo.lock b/Cargo.lock index 7cf8d45..b650053 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -289,7 +289,6 @@ version = "0.1.0" dependencies = [ "parking_lot", "postcard", - "serde", "syslog_structs", ] diff --git a/src/main.rs b/src/main.rs index f31338c..49d5629 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ #![feature(int_roundings)] #![deny(unsafe_op_in_unsafe_fn)] +use std::ffi::CString; use std::os::mikros::loader::Loader; use std::os::mikros::syscalls::{get_initrd, new_process}; use std::path::Path; @@ -56,5 +57,6 @@ fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 { .expect(&format!("{} not found", path)) .data(); 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() }