Keep processing syslog messages after starting phase 2
This commit is contained in:
parent
37895459bc
commit
3dcccb2ba2
17
src/main.rs
17
src/main.rs
@ -99,7 +99,7 @@ fn main() {
|
||||
.send_text_message("init", "Started the tar archive FS")
|
||||
.unwrap();
|
||||
|
||||
let mut msg_handler= SyslogMessageHandler::new();
|
||||
let mut msg_handler = SyslogMessageHandler::new();
|
||||
|
||||
loop {
|
||||
let msg = msg_handler.get_message();
|
||||
@ -130,13 +130,17 @@ fn main() {
|
||||
.send_text_message("init", "Mounted the initrd as the root FS")
|
||||
.unwrap();
|
||||
Command::new("/bin/serial_driver").spawn().unwrap();
|
||||
while !msg_handler.registered_devices.iter().any(|x| x=="ttyS0") {
|
||||
while !msg_handler.registered_devices.iter().any(|x| x == "ttyS0") {
|
||||
msg_handler.process_messages();
|
||||
}
|
||||
Command::new("/bin/partserv").spawn().unwrap();
|
||||
Command::new("/bin/ext2").spawn().unwrap();
|
||||
Command::new("/bin/pci").spawn().unwrap();
|
||||
while !msg_handler.registered_devices.iter().any(|x| x=="ahci0d0p1") {
|
||||
while !msg_handler
|
||||
.registered_devices
|
||||
.iter()
|
||||
.any(|x| x == "ahci0d0p1")
|
||||
{
|
||||
msg_handler.process_messages();
|
||||
}
|
||||
|
||||
@ -148,8 +152,7 @@ fn main() {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
while !msg_handler.registered_devices.iter().any(|x| x=="bga0") {
|
||||
while !msg_handler.registered_devices.iter().any(|x| x == "bga0") {
|
||||
msg_handler.process_messages();
|
||||
}
|
||||
|
||||
@ -174,6 +177,10 @@ fn main() {
|
||||
.unwrap();
|
||||
|
||||
Command::new("/bin/init_phase2").spawn().unwrap();
|
||||
|
||||
loop {
|
||||
msg_handler.process_messages();
|
||||
}
|
||||
}
|
||||
|
||||
fn run_initrd_proc(initrd: &TarArchiveRef, path: &str) -> u64 {
|
||||
|
Loading…
Reference in New Issue
Block a user