semihosting: fix non-zero value on Windows isatty()
commit9f23a1d7c1e27c556ef9787b9d3f263f5c1ecf24
authorMarek Vrbka <marek.vrbka@codasip.com>
Tue, 30 May 2023 12:16:38 +0000 (30 14:16 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 10 Jun 2023 17:10:27 +0000 (10 17:10 +0000)
tree9dbf35a410b486a9358042883e8f51e9d8c644c6
parent71180e67537117f841ff5dd7c359e3678d861e2b
semihosting: fix non-zero value on Windows isatty()

On Windows, isatty() can return any non-zero value if it's an interactive
device. Which diverges from the ARM semihosting specification. This patch
introduces a fix to make the SYS_ISTTY operation conform to spec.

Change-Id: I9bc4f3cb82370812825d52419851910b3e3f35cc
Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7725
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
src/target/semihosting_common.c