]> Zhao Yanbai Git Server - minix.git/commitdiff
*** empty log message ***
authorJorrit Herder <jnherder@minix3.org>
Tue, 2 Aug 2005 15:50:00 +0000 (15:50 +0000)
committerJorrit Herder <jnherder@minix3.org>
Tue, 2 Aug 2005 15:50:00 +0000 (15:50 +0000)
lib/other/_devctl.c [new file with mode: 0644]
lib/syscall/devctl.s [new file with mode: 0644]

diff --git a/lib/other/_devctl.c b/lib/other/_devctl.c
new file mode 100644 (file)
index 0000000..a7454c8
--- /dev/null
@@ -0,0 +1,16 @@
+#include <lib.h>
+#define devctl _devctl
+#include <unistd.h>
+
+
+PUBLIC int devctl(int ctl_req, int proc_nr, int dev_nr, int dev_style)
+{
+  message m;
+  m.m4_l1 = ctl_req;
+  m.m4_l2 = proc_nr;
+  m.m4_l3 = dev_nr;
+  m.m4_l4 = dev_style;
+  if (_syscall(FS, DEVCTL, &m) < 0) return(-1);
+  return(0);
+}
+
diff --git a/lib/syscall/devctl.s b/lib/syscall/devctl.s
new file mode 100644 (file)
index 0000000..43aa9ec
--- /dev/null
@@ -0,0 +1,7 @@
+.sect .text
+.extern        __devctl
+.define        _devctl
+.align 2
+
+_devctl:
+       jmp     __devctl