qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch] arm seek syscall fix


From: Paul Brook
Subject: [Qemu-devel] [patch] arm seek syscall fix
Date: Sun, 24 Apr 2005 18:39:35 +0100
User-agent: KMail/1.7.2

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 via email to

[Prev in Thread] Current Thread [Next in Thread]