[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] fix 0 sized write syscall
From: |
Riku Voipio |
Subject: |
[Qemu-devel] [PATCH 4/4] fix 0 sized write syscall |
Date: |
Fri, 26 Mar 2010 15:25:12 +0000 |
From: Riku Voipio <address@hidden>
fixes running ldconfig under qemu linux-user
Signed-off-by: Riku Voipio <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: address@hidden
---
exec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/exec.c b/exec.c
index 14767b7..c834be2 100644
--- a/exec.c
+++ b/exec.c
@@ -2409,8 +2409,11 @@ int page_check_range(target_ulong start, target_ulong
len, int flags)
#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS
assert(start < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
#endif
+ if (len == 0) {
+ return 0;
+ }
- if (start + len - 1 < start) {
+ if (start + len < start) {
/* We've wrapped around. */
return -1;
}
--
1.6.5