Compare commits
2 Commits
2f78df693c
...
5989f61b4b
Author | SHA1 | Date | |
---|---|---|---|
5989f61b4b | |||
4c9f4171e5 |
33
src/main.rs
33
src/main.rs
@ -75,31 +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]);
|
||||
syslog_client
|
||||
.send_text_message("init", "Started syslog")
|
||||
.unwrap();
|
||||
let mut msg_handler = SyslogMessageHandler::new();
|
||||
let vfs_pid = run_initrd_proc(&initrd, "bin/vfs");
|
||||
syslog_client
|
||||
.send_text_message("init", "Started the VFS")
|
||||
.unwrap();
|
||||
run_initrd_proc(&initrd, "bin/devfs");
|
||||
syslog_client
|
||||
.send_text_message("init", "Started the devfs")
|
||||
.unwrap();
|
||||
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();
|
||||
syslog_client
|
||||
.send_text_message("init", "Mounted /dev")
|
||||
.unwrap();
|
||||
run_initrd_proc(&initrd, "bin/tarfs");
|
||||
syslog_client
|
||||
.send_text_message("init", "Started the tar archive FS")
|
||||
.unwrap();
|
||||
|
||||
let mut msg_handler = SyslogMessageHandler::new();
|
||||
|
||||
loop {
|
||||
let msg = msg_handler.get_message();
|
||||
if msg.from == "tarfs" {
|
||||
@ -107,9 +96,6 @@ fn main() {
|
||||
}
|
||||
}
|
||||
run_initrd_proc(&initrd, "bin/initrd_driver");
|
||||
syslog_client
|
||||
.send_text_message("init", "Started the initrd pseudodevice driver")
|
||||
.unwrap();
|
||||
while !msg_handler
|
||||
.registered_devices
|
||||
.iter()
|
||||
@ -120,9 +106,6 @@ fn main() {
|
||||
vfs_client
|
||||
.mount(Path::new("/dev/initrd"), "tarfs", Path::new("/"))
|
||||
.unwrap();
|
||||
syslog_client
|
||||
.send_text_message("init", "Mounted the initrd as the root FS")
|
||||
.unwrap();
|
||||
Command::new("/bin/partserv").spawn().unwrap();
|
||||
Command::new("/bin/ext2").spawn().unwrap();
|
||||
Command::new("/bin/pci").spawn().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user