[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/34] linux-user: Remove redundant get_errno() call
From: |
Timothy E Baldwin |
Subject: |
[Qemu-devel] [PATCH 15/34] linux-user: Remove redundant get_errno() calls |
Date: |
Sun, 6 Sep 2015 00:57:09 +0100 |
The return value of openat was being translated by get_errno() twice.
Fixed by removing calls of get_errno() in do_syscall() and keeping those
in do_openat().
Signed-off-by: Timothy Edward Baldwin <address@hidden>
---
linux-user/syscall.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index c213588..df9b2ca 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5764,17 +5764,17 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
case TARGET_NR_open:
if (!(p = lock_user_string(arg1)))
goto efault;
- ret = get_errno(do_openat(cpu_env, AT_FDCWD, p,
- target_to_host_bitmask(arg2,
fcntl_flags_tbl),
- arg3));
+ ret = do_openat(cpu_env, AT_FDCWD, p,
+ target_to_host_bitmask(arg2, fcntl_flags_tbl),
+ arg3);
unlock_user(p, arg1, 0);
break;
case TARGET_NR_openat:
if (!(p = lock_user_string(arg2)))
goto efault;
- ret = get_errno(do_openat(cpu_env, arg1, p,
- target_to_host_bitmask(arg3,
fcntl_flags_tbl),
- arg4));
+ ret = do_openat(cpu_env, arg1, p,
+ target_to_host_bitmask(arg3, fcntl_flags_tbl),
+ arg4);
unlock_user(p, arg2, 0);
break;
case TARGET_NR_close:
--
2.1.4
- [Qemu-devel] [PATCH 04/34] linux-user: Support for restarting system calls for x86 targets, (continued)
- [Qemu-devel] [PATCH 04/34] linux-user: Support for restarting system calls for x86 targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 06/34] linux-user: Support for restarting system calls for MIPS targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 03/34] linux-user: Support for restarting system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 09/34] linux-user: Test for restarting system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 19/34] linux-user: Restart fork() if signals pending, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 15/34] linux-user: Remove redundant get_errno() calls,
Timothy E Baldwin <=
- [Qemu-devel] [PATCH 17/34] linux-user: Use safe_syscall for wait system calls, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 21/34] linux-user: Remove redundant gdb_queuesig(), Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 10/34] linux-user: Support for restarting system calls for Microblaze targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 07/34] linux-user: Support for restarting system calls for PPC targets, Timothy E Baldwin, 2015/09/05
- [Qemu-devel] [PATCH 14/34] linux-user: Use safe_syscall for read and write system calls, Timothy E Baldwin, 2015/09/05