Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
syscall
Commits
040ebf99
Verified
Commit
040ebf99
authored
Mar 07, 2021
by
4lDO2
🖖
Browse files
Get the mmap test to build.
parent
0f9030f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tests.rs
View file @
040ebf99
...
...
@@ -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
));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment