2005-08-02 17:50:00 +02:00
|
|
|
#include <lib.h>
|
|
|
|
#define devctl _devctl
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
2006-05-11 16:47:31 +02:00
|
|
|
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;
|
2006-05-11 16:47:31 +02:00
|
|
|
m.m4_l5 = force;
|
2005-08-02 17:50:00 +02:00
|
|
|
if (_syscall(FS, DEVCTL, &m) < 0) return(-1);
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|