1
0
Fork 0
forked from koniifer/ableos

added a Path type and reverted to vga

This commit is contained in:
Able 2022-04-25 15:33:17 -05:00
parent 08c2cf73ea
commit 9c300acc33
2 changed files with 24 additions and 2 deletions

View file

@ -21,7 +21,8 @@ run-args = [
"-soundhw", "pcspk", "-soundhw", "pcspk",
"-device", "virtio-gpu-pci", "-device", "VGA",
# "-device", "virtio-gpu-pci",
# "-machine", "pcspk-audiodev=0", # "-machine", "pcspk-audiodev=0",

View file

@ -24,7 +24,7 @@ pub fn scratchpad() {
for node in axel { for node in axel {
info!("{:?}", node); info!("{:?}", node);
} }
/*
use crate::devices::pci::brute_force_scan; use crate::devices::pci::brute_force_scan;
let infos = brute_force_scan(); let infos = brute_force_scan();
for device in infos { for device in infos {
@ -40,10 +40,14 @@ pub fn scratchpad() {
} }
} }
*/
// sound(1000); // sound(1000);
// sound_off(); // sound_off();
// acpi(); // acpi();
Path::new("/".to_string());
real_shell(); real_shell();
} }
use crate::port_io::write16; use crate::port_io::write16;
@ -227,3 +231,20 @@ pub fn sound_off() {
} }
use cpuio::inb; use cpuio::inb;
pub struct Path {
pub path: Vec<String>,
}
impl Path {
pub fn new(path: String) -> Self {
let mut path_vec_string = vec![];
for part in path.split(&['\\', '/'][..]) {
path_vec_string.push(part.to_string());
}
Path {
path: path_vec_string,
}
}
}