. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / other / _svrctl.c
blob5836fefbe67da41e14a70efcd936f8c934c492d4
1 /* svrctl() - special server control functions. Author: Kees J. Bot
2 * 24 Apr 1994
3 */
4 #include <lib.h>
5 #include <stdio.h>
6 #define svrctl _svrctl
7 #include <sys/svrctl.h>
9 int svrctl(int request, void *argp)
11 message m;
13 m.m2_i1 = request;
14 m.m2_p1 = argp;
16 switch ((request >> 8) & 0xFF) {
17 case 'M':
18 case 'S':
19 /* MM handles calls for itself and the kernel. */
20 return _syscall(MM, SVRCTL, &m);
21 case 'F':
22 case 'I':
23 /* FS handles calls for itself and inet. */
24 return _syscall(FS, SVRCTL, &m);
25 default:
26 errno = EINVAL;
27 return -1;