Get the mmap test to build.

This commit is contained in:
4lDO2
2021-03-07 16:16:40 +01:00
parent 0f9030f032
commit 040ebf99d9

View File

@@ -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));
}
}