[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/18] syscall: really return ret code
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 11/18] syscall: really return ret code |
Date: |
Mon, 20 Jun 2011 19:20:16 +0300 |
From: Juan Quintela <address@hidden>
We assign ret with the error code, but then return 0 unconditionally.
Signed-off-by: Juan Quintela <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 362cc63..57d9233 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3779,10 +3779,10 @@ static abi_long do_get_thread_area(CPUX86State *env,
abi_ulong ptr)
#ifndef TARGET_ABI32
static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
{
- abi_long ret;
+ abi_long ret = 0;
abi_ulong val;
int idx;
-
+
switch(code) {
case TARGET_ARCH_SET_GS:
case TARGET_ARCH_SET_FS:
@@ -3801,13 +3801,13 @@ static abi_long do_arch_prctl(CPUX86State *env, int
code, abi_ulong addr)
idx = R_FS;
val = env->segs[idx].base;
if (put_user(val, addr, abi_ulong))
- return -TARGET_EFAULT;
+ ret = -TARGET_EFAULT;
break;
default:
ret = -TARGET_EINVAL;
break;
}
- return 0;
+ return ret;
}
#endif
--
1.7.4.1
- Re: [Qemu-devel] [PATCH 02/18] linux-user: Fix the load of ELF files that have no "useful" symbol, (continued)
- [Qemu-devel] [PATCH 07/18] linux-user: Fix the computation of the requested heap size, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 03/18] linux-user: Handle images where lowest vaddr is not page aligned, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 06/18] m68k-semi.c: Use correct check for failure of do_brk(), riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 08/18] linux-user: add pselect6 syscall support, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 09/18] linux-user: Define AT_RANDOM to support target stack protection mechanism., riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 10/18] linuxload: id_change was a write only variable, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 11/18] syscall: really return ret code,
riku . voipio <=
- [Qemu-devel] [PATCH 12/18] linux-user: syscall should use sanitized arg1, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 13/18] flatload: end_code was only used in a debug message, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 14/18] flatload: memp was a write-only variable, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 15/18] linux-user: Bump do_syscall() up to 8 syscall arguments, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 16/18] linux-user/signal.c: Remove only-ever-set variable fpu_save_addr, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 17/18] linux-user/signal.c: Remove unused fenab, riku . voipio, 2011/06/20
- [Qemu-devel] [PATCH 18/18] linux-user: Fix sync_file_range on 32bit mips, riku . voipio, 2011/06/20