Commit f2674e31e0b79a8e30335438f274b846d084a383
1 parent
4690764b
old select support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@313 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
17 additions
and
1 deletions
linux-user/syscall.c
... | ... | @@ -1763,7 +1763,17 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, |
1763 | 1763 | } |
1764 | 1764 | break; |
1765 | 1765 | case TARGET_NR_select: |
1766 | - goto unimplemented; | |
1766 | + { | |
1767 | + struct target_sel_arg_struct *sel = (void *)arg1; | |
1768 | + sel->n = tswapl(sel->n); | |
1769 | + sel->inp = tswapl(sel->inp); | |
1770 | + sel->outp = tswapl(sel->outp); | |
1771 | + sel->exp = tswapl(sel->exp); | |
1772 | + sel->tvp = tswapl(sel->tvp); | |
1773 | + ret = do_select(sel->n, (void *)sel->inp, (void *)sel->outp, | |
1774 | + (void *)sel->exp, (void *)sel->tvp); | |
1775 | + } | |
1776 | + break; | |
1767 | 1777 | case TARGET_NR_symlink: |
1768 | 1778 | ret = get_errno(symlink((const char *)arg1, (const char *)arg2)); |
1769 | 1779 | break; | ... | ... |
linux-user/syscall_defs.h
... | ... | @@ -390,6 +390,12 @@ struct target_tms { |
390 | 390 | target_clock_t tms_cstime; |
391 | 391 | }; |
392 | 392 | |
393 | +struct target_sel_arg_struct { | |
394 | + target_long n; | |
395 | + target_long inp, outp, exp; | |
396 | + target_long tvp; | |
397 | +}; | |
398 | + | |
393 | 399 | struct target_iovec { |
394 | 400 | target_long iov_base; /* Starting address */ |
395 | 401 | target_long iov_len; /* Number of bytes */ | ... | ... |