summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorbalrog2008-02-10 14:28:08 +0100
committerbalrog2008-02-10 14:28:08 +0100
commit7bedce8d85a0f1d8b1b2a87618cde4c1e3f53976 (patch)
tree560b09a1c1d938c8be6af0c5f6a9452880db2e99 /linux-user
parentRemove unused boolean_t, should fix building for Solaris. (diff)
downloadqemu-7bedce8d85a0f1d8b1b2a87618cde4c1e3f53976.tar.gz
qemu-7bedce8d85a0f1d8b1b2a87618cde4c1e3f53976.tar.xz
qemu-7bedce8d85a0f1d8b1b2a87618cde4c1e3f53976.zip
Don't error out on zero-length chunks in writev, as to mimic Linux (Kirill A. Shutemov).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3970 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 70aff84572..e8b49ca4a5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1029,7 +1029,7 @@ static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr,
vec[i].iov_len = tswapl(target_vec[i].iov_len);
if (vec[i].iov_len != 0) {
vec[i].iov_base = lock_user(type, base, vec[i].iov_len, copy);
- if (!vec[i].iov_base)
+ if (!vec[i].iov_base && vec[i].iov_len)
goto fail;
} else {
/* zero length pointer is ignored */