Only print syslog messages after starting phase 2 init
This commit is contained in:
parent
73eb1e629d
commit
d6254f8c7c
11
src/main.rs
11
src/main.rs
@ -37,10 +37,15 @@ impl SyslogMessageHandler {
|
||||
}
|
||||
|
||||
fn process_messages(&mut self) {
|
||||
ipc::process_messages();
|
||||
let mut no_messages = true;
|
||||
while let Some(msg) = syslog_msg_ipc::try_get_syslog_msg() {
|
||||
no_messages = false;
|
||||
self.process_message(&msg);
|
||||
}
|
||||
if no_messages {
|
||||
ipc::process_messages();
|
||||
self.process_messages();
|
||||
}
|
||||
}
|
||||
|
||||
fn process_message(&mut self, msg: &Message) {
|
||||
@ -154,8 +159,6 @@ fn main() {
|
||||
|
||||
let display = File::open("/dev/bga0").unwrap();
|
||||
|
||||
msg_handler.set_output(display);
|
||||
|
||||
syslog_client
|
||||
.send_text_message("init", "Display initialized")
|
||||
.unwrap();
|
||||
@ -166,6 +169,8 @@ fn main() {
|
||||
|
||||
Command::new("/bin/init_phase2").spawn().unwrap();
|
||||
|
||||
msg_handler.set_output(display);
|
||||
|
||||
loop {
|
||||
msg_handler.process_messages();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user