Revision a5448a7d linux-user/syscall.c
b/linux-user/syscall.c | ||
---|---|---|
43 | 43 |
#include <sys/times.h> |
44 | 44 |
#include <sys/shm.h> |
45 | 45 |
#include <utime.h> |
46 |
#include <sys/sysinfo.h> |
|
46 | 47 |
//#include <sys/user.h> |
47 | 48 |
#include <netinet/ip.h> |
48 | 49 |
#include <netinet/tcp.h> |
... | ... | |
2348 | 2349 |
ret = get_errno(swapoff((const char *)arg1)); |
2349 | 2350 |
break; |
2350 | 2351 |
case TARGET_NR_sysinfo: |
2351 |
goto unimplemented; |
|
2352 |
{ |
|
2353 |
struct target_sysinfo *target_value = (void *)arg1; |
|
2354 |
struct sysinfo value; |
|
2355 |
ret = get_errno(sysinfo(&value)); |
|
2356 |
if (!is_error(ret) && target_value) |
|
2357 |
{ |
|
2358 |
__put_user(value.uptime, &target_value->uptime); |
|
2359 |
__put_user(value.loads[0], &target_value->loads[0]); |
|
2360 |
__put_user(value.loads[1], &target_value->loads[1]); |
|
2361 |
__put_user(value.loads[2], &target_value->loads[2]); |
|
2362 |
__put_user(value.totalram, &target_value->totalram); |
|
2363 |
__put_user(value.freeram, &target_value->freeram); |
|
2364 |
__put_user(value.sharedram, &target_value->sharedram); |
|
2365 |
__put_user(value.bufferram, &target_value->bufferram); |
|
2366 |
__put_user(value.totalswap, &target_value->totalswap); |
|
2367 |
__put_user(value.freeswap, &target_value->freeswap); |
|
2368 |
__put_user(value.procs, &target_value->procs); |
|
2369 |
__put_user(value.totalhigh, &target_value->totalhigh); |
|
2370 |
__put_user(value.freehigh, &target_value->freehigh); |
|
2371 |
__put_user(value.mem_unit, &target_value->mem_unit); |
|
2372 |
} |
|
2373 |
} |
|
2374 |
break; |
|
2352 | 2375 |
case TARGET_NR_ipc: |
2353 | 2376 |
ret = do_ipc(arg1, arg2, arg3, arg4, arg5, arg6); |
2354 | 2377 |
break; |
Also available in: Unified diff