minix/lib/other/_devctl.c

19 lines
328 B
C
Raw Normal View History

2005-08-02 17:50:00 +02:00
#include <lib.h>
#define devctl _devctl
#include <unistd.h>
PUBLIC int devctl(int ctl_req, int proc_nr, int dev_nr, int dev_style,
int force)
2005-08-02 17:50:00 +02:00
{
message m;
m.m4_l1 = ctl_req;
m.m4_l2 = proc_nr;
m.m4_l3 = dev_nr;
m.m4_l4 = dev_style;
m.m4_l5 = force;
2005-08-02 17:50:00 +02:00
if (_syscall(FS, DEVCTL, &m) < 0) return(-1);
return(0);
}