The getsysinfo(2), getrusage(2), and svrctl(2) calls used the same call number to different services. Since we want to give each service its own call number ranges, this is no longer tenable. This patch introduces per-service call numbers for these calls. Change-Id: I80d728bbeb98227359c525494c433965b40fefc3
29 lines
561 B
C
29 lines
561 B
C
/* svrctl() - special server control functions. Author: Kees J. Bot
|
|
* 24 Apr 1994
|
|
*/
|
|
#include <lib.h>
|
|
#include <stdio.h>
|
|
#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':
|
|
/* PM handles calls for itself and the kernel. */
|
|
return _syscall(PM_PROC_NR, PM_SVRCTL, &m);
|
|
case 'F':
|
|
case 'I':
|
|
/* VFS handles calls for itself and inet. */
|
|
return _syscall(VFS_PROC_NR, VFS_SVRCTL, &m);
|
|
default:
|
|
errno = EINVAL;
|
|
return -1;
|
|
}
|
|
}
|