Verified Commit 040ebf99 authored by 4lDO2's avatar 4lDO2 🖖
Browse files

Get the mmap test to build.

parent 0f9030f0
......@@ -107,12 +107,15 @@ fn fmap() {
)
).unwrap();
let size = 128;
let map = unsafe {
slice::from_raw_parts_mut(
dbg!(
crate::fmap(fd, &crate::Map {
address: 0,
offset: 0,
size: 128,
size,
flags: crate::PROT_READ | crate::PROT_WRITE
})
).unwrap() as *mut u8,
......@@ -131,7 +134,7 @@ fn fmap() {
//TODO: add msync
unsafe {
assert_eq!(dbg!(
crate::funmap(map.as_mut_ptr() as usize)
crate::funmap(map.as_mut_ptr() as usize, size)
), Ok(0));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment