source: trunk/minix/lib/other/_svrctl.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 559 bytes
Line 
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>
8
9int svrctl(int request, void *argp)
10{
11 message m;
12
13 m.m2_i1 = request;
14 m.m2_p1 = argp;
15
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;
28 }
29}
Note: See TracBrowser for help on using the repository browser.