From: Nicolas P. <np...@us...> - 2010-02-02 06:12:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3d2d5dcc9c27b84dc2e5e9ed53be0f784a450042 (commit) from bef37ceba2bde6a34d003762bced007bed894bc7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3d2d5dcc9c27b84dc2e5e9ed53be0f784a450042 Author: Nicolas Pitre <ni...@fl...> Date: Tue Feb 2 00:05:42 2010 -0500 ARM semihosting: fix EOF handling with SYS_READ The semihosting interface has a strange convention for read/write where the unused amount of buffer must be returned. We failed to return the total buffer size when the local read() call returned 0. Signed-off-by: Nicolas Pitre <ni...@ma...> diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c index c41c5a0..9b853d9 100644 --- a/src/target/arm_semihosting.c +++ b/src/target/arm_semihosting.c @@ -190,7 +190,7 @@ static int do_semihosting(struct target *target) } else { result = read(fd, buf, l); armv4_5->semihosting_errno = errno; - if (result > 0) { + if (result >= 0) { retval = target_write_buffer(target, a, result, buf); if (retval != ERROR_OK) { free(buf); ----------------------------------------------------------------------- Summary of changes: src/target/arm_semihosting.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |