qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]