forked from AbleOS/ableos
added a Path type and reverted to vga
This commit is contained in:
parent
08c2cf73ea
commit
9c300acc33
|
@ -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",
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue