. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / other / _getsysinfo.c
blobfa8c223388134c6f7637b295ad30736170a97bb0
1 #include <lib.h>
2 #include <minix/endpoint.h>
3 #define getsysinfo _getsysinfo
4 #define getsysinfo_up _getsysinfo_up
5 #include <minix/sysinfo.h>
8 PUBLIC int getsysinfo(who, what, where)
9 endpoint_t who; /* from whom to request info */
10 int what; /* what information is requested */
11 void *where; /* where to put it */
13 message m;
14 m.m1_i1 = what;
15 m.m1_p1 = where;
16 if (_syscall(who, GETSYSINFO, &m) < 0) return(-1);
17 return(0);
20 /* Unprivileged variant of getsysinfo. */
21 PUBLIC ssize_t getsysinfo_up(who, what, size, where)
22 endpoint_t who; /* from whom to request info */
23 int what; /* what information is requested */
24 size_t size; /* input and output size */
25 void *where; /* where to put it */
27 message m;
28 m.SIU_WHAT = what;
29 m.SIU_WHERE = where;
30 m.SIU_LEN = size;
31 return _syscall(who, GETSYSINFO_UP, &m);