aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 58fb967499..019af632df 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6772,6 +6772,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
}
return ret;
case TARGET_NR_write:
+ if (arg2 == 0 && arg3 == 0) {
+ return get_errno(safe_write(arg1, 0, 0));
+ }
if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1)))
return -TARGET_EFAULT;
if (fd_trans_target_to_host_data(arg1)) {