From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] arm seek syscall fix
Date: Sun, 24 Apr 2005 18:39:35 +0100 [thread overview]
Message-ID: <200504241839.35669.paul@codesourcery.com> (raw)
The patch below corrects the arm semihosting seek syscall return value.
Paul
Index: linux-user/arm-semi.c
===================================================================
RCS file: /cvsroot/qemu/qemu/linux-user/arm-semi.c,v
retrieving revision 1.1
diff -u -p -r1.1 arm-semi.c
--- linux-user/arm-semi.c 23 Apr 2005 18:25:40 -0000 1.1
+++ linux-user/arm-semi.c 24 Apr 2005 17:02:21 -0000
@@ -124,7 +125,10 @@ uint32_t do_arm_semihosting(CPUState *en
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;
reply other threads:[~2005-04-24 17:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200504241839.35669.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).