Rename crates from jinux-* to aster-*

This commit is contained in:
Jianfeng Jiang
2023-12-25 03:12:25 +00:00
committed by Tate, Hongliang Tian
parent 6dbf5d560d
commit 93781df27b
460 changed files with 596 additions and 595 deletions

View File

@ -0,0 +1,27 @@
use log::info;
pub fn init() {
// print all the input device to make sure input crate will compile
for (name, _) in aster_input::all_devices() {
info!("Found Input device, name:{}", name);
}
}
#[allow(unused)]
fn block_device_test() {
for (_, device) in aster_block::all_devices() {
let mut write_buffer = [0u8; 512];
let mut read_buffer = [0u8; 512];
info!("write_buffer address:{:x}", write_buffer.as_ptr() as usize);
info!("read_buffer address:{:x}", read_buffer.as_ptr() as usize);
for i in 0..512 {
for byte in write_buffer.iter_mut() {
*byte = i as u8;
}
device.write_block(i as usize, &write_buffer);
device.read_block(i as usize, &mut read_buffer);
assert_eq!(write_buffer, read_buffer);
}
info!("block device test passed!");
}
}