1 |
/* |
/* |
2 |
* Copyright (C) 2004-2005 Anders Gavare. All rights reserved. |
* Copyright (C) 2004-2006 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: useremul.c,v 1.66 2005/11/11 13:23:15 debug Exp $ |
* $Id: useremul.c,v 1.70 2006/01/14 12:51:59 debug Exp $ |
29 |
* |
* |
30 |
* Userland (syscall) emulation. |
* Userland (syscall) emulation. |
31 |
* |
* |
364 |
uint64_t baseaddr, uint64_t len) |
uint64_t baseaddr, uint64_t len) |
365 |
{ |
{ |
366 |
unsigned char *charbuf; |
unsigned char *charbuf; |
367 |
ssize_t i; |
size_t i; |
368 |
|
|
369 |
charbuf = malloc(len); |
charbuf = malloc(len); |
370 |
if (charbuf == NULL) { |
if (charbuf == NULL) { |
699 |
case 58:res = useremul_readlink(cpu, &err, arg0, arg1, arg2); |
case 58:res = useremul_readlink(cpu, &err, arg0, arg1, arg2); |
700 |
break; |
break; |
701 |
|
|
702 |
|
case 73:/* munmap. TODO */ |
703 |
|
res = 1; |
704 |
|
break; |
705 |
|
|
706 |
case 117:res = useremul_getrusage(cpu, &err, arg0, arg1); |
case 117:res = useremul_getrusage(cpu, &err, arg0, arg1); |
707 |
break; |
break; |
708 |
|
|
1716 |
void useremul_list_emuls(void) |
void useremul_list_emuls(void) |
1717 |
{ |
{ |
1718 |
struct syscall_emul *sep; |
struct syscall_emul *sep; |
1719 |
int iadd = 8; |
int iadd = DEBUG_INDENTATION * 2; |
1720 |
|
|
1721 |
sep = first_syscall_emul; |
sep = first_syscall_emul; |
1722 |
|
|