Skip to contentSkip to conversation

arm semihosting open bug

PATCH New Paul Brook 1 participant 1 message May 1, 2005

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

PATCH 1/1 arm semihosting open bug

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

arm-semi.c +1 -1
diff -u -p -r1.2 arm-semi.c
@@ -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: