From 9c300acc3301d00cadaacf5c5737feb579cd16df Mon Sep 17 00:00:00 2001 From: Able Date: Mon, 25 Apr 2022 15:33:17 -0500 Subject: [PATCH] added a Path type and reverted to vga --- ableos/Cargo.toml | 3 ++- ableos/src/scratchpad.rs | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ableos/Cargo.toml b/ableos/Cargo.toml index d1d461a..68c8e41 100644 --- a/ableos/Cargo.toml +++ b/ableos/Cargo.toml @@ -21,7 +21,8 @@ run-args = [ "-soundhw", "pcspk", -"-device", "virtio-gpu-pci", +"-device", "VGA", +# "-device", "virtio-gpu-pci", # "-machine", "pcspk-audiodev=0", diff --git a/ableos/src/scratchpad.rs b/ableos/src/scratchpad.rs index eca0498..6c36f28 100644 --- a/ableos/src/scratchpad.rs +++ b/ableos/src/scratchpad.rs @@ -24,7 +24,7 @@ pub fn scratchpad() { for node in axel { info!("{:?}", node); } - + /* use crate::devices::pci::brute_force_scan; let infos = brute_force_scan(); for device in infos { @@ -40,10 +40,14 @@ pub fn scratchpad() { } } + */ // sound(1000); // sound_off(); // acpi(); + + Path::new("/".to_string()); + real_shell(); } use crate::port_io::write16; @@ -227,3 +231,20 @@ pub fn sound_off() { } use cpuio::inb; + +pub struct Path { + pub path: Vec, +} +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, + } + } +}