aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-04-26 20:44:10 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-04-26 20:44:10 +0000
commitd0b3e73525f17fcffff7219c6bcc2b214cff7374 (patch)
treea5b07bcde5756d3d6c4ab4b9f7e8c17ef89ce4d8 /linux-user
parente90096763d74b1126cf502c2d710d64df5ecbb63 (diff)
SYS_SEEK fix (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1402 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/arm-semi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-user/arm-semi.c b/linux-user/arm-semi.c
index f37b65c471..ea014f6bc7 100644
--- a/linux-user/arm-semi.c
+++ b/linux-user/arm-semi.c
@@ -124,7 +124,10 @@ uint32_t do_arm_semihosting(CPUState *env)
case SYS_ISTTY:
return isatty(ARG(0));
case SYS_SEEK:
- return set_swi_errno(ts, lseek(ARG(0), ARG(1), SEEK_SET));
+ ret = set_swi_errno(ts, lseek(ARG(0), ARG(1), SEEK_SET));
+ if (ret == (uint32_t)-1)
+ return -1;
+ return 0;
case SYS_FLEN:
{
struct stat buf;