* [Qemu-devel] [patch] arm seek syscall fix
@ 2005-04-24 17:39 Paul Brook
0 siblings, 0 replies; only message in thread
From: Paul Brook @ 2005-04-24 17:39 UTC (permalink / raw)
To: qemu-devel
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-24 17:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-24 17:39 [Qemu-devel] [patch] arm seek syscall fix Paul Brook
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).