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. Note that the remainder of the COMMON_ range is left intact, as these the remaining requests in it are processed by SEF and thus server- agnostic. The range should really be prefixed with SEF_ now. Change-Id: I80d728bbeb98227359c525494c433965b40fefc3
32 lines
711 B
C
32 lines
711 B
C
|
|
#include "syslib.h"
|
|
|
|
#include <string.h>
|
|
#include <minix/sysinfo.h>
|
|
#include <minix/com.h>
|
|
|
|
int getsysinfo(
|
|
endpoint_t who, /* from whom to request info */
|
|
int what, /* what information is requested */
|
|
void *where, /* where to put it */
|
|
size_t size /* how big it should be */
|
|
)
|
|
{
|
|
message m;
|
|
int call_nr;
|
|
|
|
switch (who) {
|
|
case PM_PROC_NR: call_nr = PM_GETSYSINFO; break;
|
|
case VFS_PROC_NR: call_nr = VFS_GETSYSINFO; break;
|
|
case RS_PROC_NR: call_nr = RS_GETSYSINFO; break;
|
|
case DS_PROC_NR: call_nr = DS_GETSYSINFO; break;
|
|
default:
|
|
return ENOSYS;
|
|
}
|
|
|
|
memset(&m, 0, sizeof(m));
|
|
m.SI_WHAT = what;
|
|
m.SI_WHERE = where;
|
|
m.SI_SIZE = size;
|
|
return _taskcall(who, call_nr, &m);
|
|
}
|