diff --git a/src/main.rs b/src/main.rs index b8ccb98..54627a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -75,15 +75,20 @@ fn main() { syslog_client.subscribe_to_text(); syslog_client.subscribe_to_binary("devfs".to_string(), vec![0, 1]); syslog_client.subscribe_to_binary("tarfs".to_string(), vec![0]); + let mut msg_handler = SyslogMessageHandler::new(); let vfs_pid = run_initrd_proc(&initrd, "bin/vfs"); - run_initrd_proc(&initrd, "bin/devfs"); let vfs_client = vfs_rpc::Client::new(vfs_pid); + run_initrd_proc(&initrd, "bin/devfs"); + loop { + let msg = msg_handler.get_message(); + if msg.from == "devfs" { + break; + } + } vfs_client .mount(Path::new("/dummy"), "devfs", Path::new("/dev")) .unwrap(); run_initrd_proc(&initrd, "bin/tarfs"); - let mut msg_handler = SyslogMessageHandler::new(); - loop { let msg = msg_handler.get_message(); if msg.from == "tarfs" {