2022-02-09 07:08:40 -06:00
|
|
|
use alloc::{string::String, vec::Vec};
|
|
|
|
use genfs::{Fs, OpenOptions};
|
|
|
|
|
|
|
|
use crate::{filesystem::FILE_SYSTEM, wasm_jumploader::interp};
|
2022-02-08 03:01:29 -06:00
|
|
|
|
|
|
|
/// Experimental scratchpad for testing.
|
|
|
|
pub fn scratchpad() {
|
2022-02-09 07:08:40 -06:00
|
|
|
let fs = &*FILE_SYSTEM.lock();
|
|
|
|
let file = fs
|
|
|
|
.open(b"/home/able/kernel.md", OpenOptions::new().read(true))
|
|
|
|
.unwrap();
|
2022-02-08 03:01:29 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
let mut file_bytes = Vec::new();
|
|
|
|
file.read_to_end(&mut file_bytes).unwrap();
|
2022-02-08 03:01:29 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
let string = String::from_utf8_lossy(&file_bytes);
|
2022-02-08 03:01:29 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
print!("{}", string);
|
2022-02-08 04:13:53 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
let pci_list = tinypci::brute_force_scan();
|
2022-02-08 04:13:53 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
for pci in pci_list {
|
|
|
|
info!("{}", pci);
|
|
|
|
}
|
2022-02-08 04:13:53 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
interp();
|
2022-02-08 04:13:53 -06:00
|
|
|
}
|