ARM semihosting: fix writing to stdout
commit465a06dfdc6c5d4af377dac7b9d71845cb0dc034
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Wed, 27 Jan 2010 21:20:18 +0000 (27 21:20 +0000)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Thu, 28 Jan 2010 20:21:31 +0000 (28 20:21 +0000)
tree2e3e5e3a4089ca621e486795b37154a1309fce1b
parent3172be80a3e14f4c8c3628a37db348c04fd60fc4
ARM semihosting: fix writing to stdout

SYS_FLEN would be called before a write on a descriptor to check its size.
Currently lseek would fail with -1 when given the stdout/stderr descriptor.
Changing to use fstat seems to be the standard way of handling this.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
src/helper/system.h
src/target/arm_semihosting.c