Wait for the devfs to initialize before mounting it
This commit is contained in:
parent
4c9f4171e5
commit
5989f61b4b
11
src/main.rs
11
src/main.rs
@ -75,15 +75,20 @@ fn main() {
|
|||||||
syslog_client.subscribe_to_text();
|
syslog_client.subscribe_to_text();
|
||||||
syslog_client.subscribe_to_binary("devfs".to_string(), vec![0, 1]);
|
syslog_client.subscribe_to_binary("devfs".to_string(), vec![0, 1]);
|
||||||
syslog_client.subscribe_to_binary("tarfs".to_string(), vec![0]);
|
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");
|
let vfs_pid = run_initrd_proc(&initrd, "bin/vfs");
|
||||||
run_initrd_proc(&initrd, "bin/devfs");
|
|
||||||
let vfs_client = vfs_rpc::Client::new(vfs_pid);
|
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
|
vfs_client
|
||||||
.mount(Path::new("/dummy"), "devfs", Path::new("/dev"))
|
.mount(Path::new("/dummy"), "devfs", Path::new("/dev"))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
run_initrd_proc(&initrd, "bin/tarfs");
|
run_initrd_proc(&initrd, "bin/tarfs");
|
||||||
let mut msg_handler = SyslogMessageHandler::new();
|
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let msg = msg_handler.get_message();
|
let msg = msg_handler.get_message();
|
||||||
if msg.from == "tarfs" {
|
if msg.from == "tarfs" {
|
||||||
|
Loading…
Reference in New Issue
Block a user