Remove building with NOCRYPTO option
[minix.git] / minix / lib / libsys / getsysinfo.c
blob8bdc1ec2694dceb577254fb4cd903566d70a25b3
2 #include "syslib.h"
4 #include <string.h>
5 #include <minix/sysinfo.h>
6 #include <minix/com.h>
8 int getsysinfo(
9 endpoint_t who, /* from whom to request info */
10 int what, /* what information is requested */
11 void *where, /* where to put it */
12 size_t size /* how big it should be */
15 message m;
16 int call_nr;
18 switch (who) {
19 case PM_PROC_NR: call_nr = PM_GETSYSINFO; break;
20 case VFS_PROC_NR: call_nr = VFS_GETSYSINFO; break;
21 case RS_PROC_NR: call_nr = RS_GETSYSINFO; break;
22 case DS_PROC_NR: call_nr = DS_GETSYSINFO; break;
23 default:
24 return ENOSYS;
27 memset(&m, 0, sizeof(m));
28 m.m_lsys_getsysinfo.what = what;
29 m.m_lsys_getsysinfo.where = (vir_bytes)where;
30 m.m_lsys_getsysinfo.size = size;
31 return _taskcall(who, call_nr, &m);