diff options
author | Roman I Khimov <khimov@altell.ru> | 2010-03-08 11:50:21 +0300 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2010-04-26 11:35:50 -0500 |
commit | 2b0109cdd8be5a58d230db249da51abf617d2ca0 (patch) | |
tree | 4ed1cd5ac707262ca98965e13618adac78faf5f6 /recipes/qemu/qemu-0.12.3/32_syscall_sysctl.patch | |
parent | 89f3a006a15986d045cddc0f405ecac78d11bb9a (diff) |
qemu: add version 0.12.3
qemu-native tested to compile on openSUSE 11.2 and Debian Lenny. Binary
locale generation tested for qemuarm/glibc, simpad/glibc,
x86-prescott/eglibc, efika/glibc.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/qemu/qemu-0.12.3/32_syscall_sysctl.patch')
-rw-r--r-- | recipes/qemu/qemu-0.12.3/32_syscall_sysctl.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes/qemu/qemu-0.12.3/32_syscall_sysctl.patch b/recipes/qemu/qemu-0.12.3/32_syscall_sysctl.patch new file mode 100644 index 0000000000..2bd90d177d --- /dev/null +++ b/recipes/qemu/qemu-0.12.3/32_syscall_sysctl.patch @@ -0,0 +1,55 @@ +#DPATCHLEVEL=0 +--- +# linux-user/syscall.c | 32 +++++++++++++++++++++++++++++--- +# 1 file changed, 29 insertions(+), 3 deletions(-) +# +Index: linux-user/syscall.c +=================================================================== +--- linux-user/syscall.c.orig ++++ linux-user/syscall.c +@@ -56,6 +56,7 @@ + #include <netinet/ip.h> + #include <netinet/tcp.h> + #include <qemu-common.h> ++#include <sys/sysctl.h> + #ifdef TARGET_GPROF + #include <sys/gmon.h> + #endif +@@ -5986,9 +5987,34 @@ abi_long do_syscall(void *cpu_env, int n + break; + #endif + case TARGET_NR__sysctl: +- /* We don't implement this, but ENOTDIR is always a safe +- return value. */ +- ret = -TARGET_ENOTDIR; ++ { ++ struct __sysctl_args *args = (struct __sysctl_args *) arg1; ++ int *name_target, *name, nlen, *oldlenp, oldlen, newlen, i; ++ void *oldval, *newval; ++ ++ name_target = (int *) tswapl((long) args->name); ++ nlen = tswapl(args->nlen); ++ oldval = (void *) tswapl((long) args->oldval); ++ oldlenp = (int *) tswapl((long) args->oldlenp); ++ oldlen = tswapl(*oldlenp); ++ newval = (void *) tswapl((long) args->newval); ++ newlen = tswapl(args->newlen); ++ ++ name = alloca(nlen * sizeof (int)); ++ for (i = 0; i < nlen; i++) ++ name[i] = tswapl(name_target[i]); ++ ++ if (nlen == 2 && name[0] == CTL_KERN && name[1] == KERN_VERSION) { ++ ret = get_errno( ++ sysctl(name, nlen, oldval, &oldlen, newval, newlen)); ++ if (!is_error(ret)) { ++ *oldlenp = tswapl(oldlen); ++ } ++ } else { ++ gemu_log("qemu: Unsupported sysctl name\n"); ++ ret = -ENOSYS; ++ } ++ } + break; + case TARGET_NR_sched_setparam: + { |