From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSHeS-0008KW-NA for qemu-devel@nongnu.org; Sun, 01 May 2005 12:50:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSHeJ-0008B2-GT for qemu-devel@nongnu.org; Sun, 01 May 2005 12:50:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSHSD-00020j-CX for qemu-devel@nongnu.org; Sun, 01 May 2005 12:38:01 -0400 Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DSH2i-0002Wt-Hh for qemu-devel@nongnu.org; Sun, 01 May 2005 12:11:40 -0400 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by mx20.gnu.org with esmtp (Exim 4.34) id 1DRtob-00019J-Hh for qemu-devel@nongnu.org; Sat, 30 Apr 2005 11:23:33 -0400 From: Paul Brook Date: Sat, 30 Apr 2005 16:21:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504301621.29099.paul@codesourcery.com> Subject: [Qemu-devel] [patch] arm semihosting open bug Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The arm semihosting open syscall does not pass the "mode" argument when creating a file. The patch below fixes this. Paul Index: arm-semi.c =================================================================== RCS file: /cvsroot/qemu/qemu/linux-user/arm-semi.c,v retrieving revision 1.2 diff -u -p -r1.2 arm-semi.c --- arm-semi.c 26 Apr 2005 20:44:10 -0000 1.2 +++ arm-semi.c 30 Apr 2005 15:13:43 -0000 @@ -99,7 +99,7 @@ uint32_t do_arm_semihosting(CPUState *en else return STDOUT_FILENO; } - return set_swi_errno(ts, open(s, open_modeflags[ARG(1)])); + return set_swi_errno(ts, open(s, open_modeflags[ARG(1)], 0644)); case SYS_CLOSE: return set_swi_errno(ts, close(ARG(0))); case SYS_WRITEC: