From: bellard Date: Tue, 26 Apr 2005 20:44:10 +0000 (+0000) Subject: SYS_SEEK fix (Paul Brook) X-Git-Tag: TizenStudio_2.0_p2.3~14814 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0b3e73525f17fcffff7219c6bcc2b214cff7374;p=sdk%2Femulator%2Fqemu.git SYS_SEEK fix (Paul Brook) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1402 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/linux-user/arm-semi.c b/linux-user/arm-semi.c index f37b65c..ea014f6 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;