]> git.proxmox.com Git - mirror_qemu.git/commitdiff
old select support
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 9 Jul 2003 12:26:09 +0000 (12:26 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 9 Jul 2003 12:26:09 +0000 (12:26 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@313 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/syscall.c
linux-user/syscall_defs.h

index b226429103e682d31d345fd82e701848bc66d452..cd3fdf553567b9c2178996d216c1c04d254f5b3d 100644 (file)
@@ -1763,7 +1763,17 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
         }
         break;
     case TARGET_NR_select:
-        goto unimplemented;
+        {
+            struct target_sel_arg_struct *sel = (void *)arg1;
+            sel->n = tswapl(sel->n);
+            sel->inp = tswapl(sel->inp);
+            sel->outp = tswapl(sel->outp);
+            sel->exp = tswapl(sel->exp);
+            sel->tvp = tswapl(sel->tvp);
+            ret = do_select(sel->n, (void *)sel->inp, (void *)sel->outp,
+                            (void *)sel->exp, (void *)sel->tvp);
+        }
+        break;
     case TARGET_NR_symlink:
         ret = get_errno(symlink((const char *)arg1, (const char *)arg2));
         break;
index 3826c12909ff0dc039febc7b3d219ab92156ae68..5caf2d855e3f328b2749343f3df9bcd412169c9f 100644 (file)
@@ -390,6 +390,12 @@ struct target_tms {
     target_clock_t tms_cstime;
 };
 
+struct target_sel_arg_struct {
+    target_long n;
+    target_long inp, outp, exp;
+    target_long tvp;
+};
+
 struct target_iovec {
     target_long iov_base;   /* Starting address */
     target_long iov_len;   /* Number of bytes */