Capture the value of "errno" in semihosting isatty() call,
as is done in other syscalls.
Change-Id: I41b72175635f06c000536f583e3efa30fb57379e
Signed-off-by: Jan Matyas <matyas@codasip.com>
Reviewed-on: http://openocd.zylin.com/6292
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
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;