2005-04-21 16:53:53 +02:00
|
|
|
/* svrctl() - special server control functions. Author: Kees J. Bot
|
|
|
|
* 24 Apr 1994
|
|
|
|
*/
|
|
|
|
#include <lib.h>
|
2005-06-27 11:30:33 +02:00
|
|
|
#include <stdio.h>
|
2005-04-21 16:53:53 +02:00
|
|
|
#define svrctl _svrctl
|
|
|
|
#include <sys/svrctl.h>
|
|
|
|
|
|
|
|
int svrctl(int request, void *argp)
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.m2_i1 = request;
|
|
|
|
m.m2_p1 = argp;
|
|
|
|
|
|
|
|
switch ((request >> 8) & 0xFF) {
|
|
|
|
case 'M':
|
|
|
|
case 'S':
|
|
|
|
/* MM handles calls for itself and the kernel. */
|
2010-06-08 15:58:01 +02:00
|
|
|
return _syscall(PM_PROC_NR, SVRCTL, &m);
|
2005-04-21 16:53:53 +02:00
|
|
|
case 'F':
|
|
|
|
case 'I':
|
|
|
|
/* FS handles calls for itself and inet. */
|
2010-06-08 15:58:01 +02:00
|
|
|
return _syscall(VFS_PROC_NR, SVRCTL, &m);
|
2005-04-21 16:53:53 +02:00
|
|
|
default:
|
|
|
|
errno = EINVAL;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|