1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-23 00:16:17 +04:00

Fit for SFS

This commit is contained in:
WangRunji 2018-07-15 16:44:21 +08:00
parent 6b0556e135
commit 1cb50c00ba

View File

@ -57,10 +57,7 @@ use core::slice;
#[cfg(target_arch = "x86_64")]
impl BlockedDevice for &'static ide::DISK0 {
fn block_size_log2(&self) -> u8 {
debug_assert_eq!(ide::BLOCK_SIZE, 512);
9
}
const BLOCK_SIZE_LOG2: u8 = 9;
fn read_at(&mut self, block_id: usize, buf: &mut [u8]) -> bool {
assert!(buf.len() >= ide::BLOCK_SIZE);
let buf = unsafe { slice::from_raw_parts_mut(buf.as_ptr() as *mut u32, ide::BLOCK_SIZE / 4) };