Add debug entry for fmap2
This commit is contained in:
@@ -50,8 +50,9 @@ impl Scheme for MemoryScheme {
|
||||
|
||||
let mut to_address = if map.address == 0 { crate::USER_GRANT_OFFSET } else {
|
||||
if // map.address < crate::USER_GRANT_OFFSET || map.address + map.size > crate::USER_GRANT_OFFSET + crate::PML4_SIZE ||
|
||||
map.address % PAGE_SIZE != 0 {
|
||||
return Err(Error::new(EINVAL));
|
||||
map.address % PAGE_SIZE != 0
|
||||
{
|
||||
return Err(Error::new(EINVAL));
|
||||
}
|
||||
map.address
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ use core::{ascii, mem};
|
||||
use alloc::string::String;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use super::data::{Map, Stat, TimeSpec};
|
||||
use super::data::{Map, Map2, Stat, TimeSpec};
|
||||
use super::flag::*;
|
||||
use super::number::*;
|
||||
use super::validate::*;
|
||||
@@ -114,6 +114,14 @@ pub fn format_call(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -
|
||||
d/mem::size_of::<Map>()
|
||||
),
|
||||
),
|
||||
SYS_FMAP2 => format!(
|
||||
"fmap2({}, {:?})",
|
||||
b,
|
||||
validate_slice(
|
||||
c as *const Map2,
|
||||
d/mem::size_of::<Map2>()
|
||||
),
|
||||
),
|
||||
SYS_FUNMAP => format!(
|
||||
"funmap({:#X})",
|
||||
b
|
||||
|
||||
Reference in New Issue
Block a user