This is an automated email from Gerrit.

Jan Matyas ([email protected]) just uploaded a new patch set to Gerrit, which 
you can find at http://openocd.zylin.com/6292

-- gerrit

commit 4fb6142a24f811bb348f4e59270121291dba97eb
Author: Jan Matyas <[email protected]>
Date:   Fri Jun 4 11:41:36 2021 +0200

    target/semihosting: Capture errno in SEMIHOSTING_SYS_ISTTY
    
    Capture the value of "errno" in semihosting isatty() call,
    as is done in other syscalls.
    
    Change-Id: I41b72175635f06c000536f583e3efa30fb57379e
    Signed-off-by: Jan Matyas <[email protected]>

diff --git a/src/target/semihosting_common.c b/src/target/semihosting_common.c
index 61a69d1..bfb1eca 100644
--- a/src/target/semihosting_common.c
+++ b/src/target/semihosting_common.c
@@ -615,6 +615,7 @@ int semihosting_common(struct target *target)
                                        return retval;
                                int fd = semihosting_get_field(target, 0, 
fields);
                                semihosting->result = isatty(fd);
+                               semihosting->sys_errno = errno;
                                LOG_DEBUG("isatty(%d)=%d", fd, 
(int)semihosting->result);
                        }
                        break;

-- 

Reply via email to