repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
For /dev/mem, map in memory to be copied to memory's own address space
[minix3.git]
/
lib
/
other
/
_devctl.c
blob
ca30bfda50cf64c6335bdc23b35382528dee964c
1
#include <lib.h>
2
#define devctl _devctl
3
#include <unistd.h>
4
5
6
PUBLIC
int
devctl
(
int
ctl_req
,
int
proc_nr
,
int
dev_nr
,
int
dev_style
,
7
int
force
)
8
{
9
message m
;
10
m
.
m4_l1
=
ctl_req
;
11
m
.
m4_l2
=
proc_nr
;
12
m
.
m4_l3
=
dev_nr
;
13
m
.
m4_l4
=
dev_style
;
14
m
.
m4_l5
=
force
;
15
if
(
_syscall
(
FS
,
DEVCTL
, &
m
) <
0
)
return
(-
1
);
16
return
(
0
);
17
}
18