Patchwork [v2] linux-user,alpha: correct select()

login
register
mail settings
Submitter Laurent Vivier
Date Jan. 10, 2013, 9:30 p.m.
Message ID <1357853450-10445-1-git-send-email-laurent@vivier.eu>
Download mbox | patch
Permalink /patch/211157/
State New
Headers show

Comments

Laurent Vivier - Jan. 10, 2013, 9:30 p.m.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
v2: remove unused TARGET_S390 and simplify ifdefs
 linux-user/syscall.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Richard Henderson - Jan. 10, 2013, 9:47 p.m.
On 01/10/2013 01:30 PM, Laurent Vivier wrote:
> Signed-off-by: Laurent Vivier<laurent@vivier.eu>
> ---
> v2: remove unused TARGET_S390 and simplify ifdefs
>   linux-user/syscall.c |   12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 94f79dd..693e66f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6227,8 +6227,11 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
             ret = get_errno(settimeofday(&tv, NULL));
         }
         break;
-#if defined(TARGET_NR_select) && !defined(TARGET_S390X) && !defined(TARGET_S390)
+#if defined(TARGET_NR_select)
     case TARGET_NR_select:
+#if defined(TARGET_S390X) || defined(TARGET_ALPHA)
+        ret = do_select(arg1, arg2, arg3, arg4, arg5);
+#else
         {
             struct target_sel_arg_struct *sel;
             abi_ulong inp, outp, exp, tvp;
@@ -6244,6 +6247,7 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
             unlock_user_struct(sel, arg1, 0);
             ret = do_select(nsel, inp, outp, exp, tvp);
         }
+#endif
         break;
 #endif
 #ifdef TARGET_NR_pselect6
@@ -7167,12 +7171,8 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         }
         break;
 #endif /* TARGET_NR_getdents64 */
-#if defined(TARGET_NR__newselect) || defined(TARGET_S390X)
-#ifdef TARGET_S390X
-    case TARGET_NR_select:
-#else
+#if defined(TARGET_NR__newselect)
     case TARGET_NR__newselect:
-#endif
         ret = do_select(arg1, arg2, arg3, arg4, arg5);
         break;
 #endif