On 5/23/22 08:35, Richard Henderson wrote:
That implies that our current code is right, in that the
way to check for "did the call fail" is to look at the
retcode, not the errno (in the same way that if you make a
native syscall or library call you look first at its return
value, not at errno). T
On Mon, 23 May 2022 at 16:35, Richard Henderson
wrote:
> On 5/23/22 05:13, Peter Maydell wrote:
> > The gdb implementation of the isatty call returns 0 or 1 on
> > success, and -1 on failure (though the only failure mode it has
> > is "you messed up the protocol packet format"):
> > https://source
On 5/23/22 05:13, Peter Maydell wrote:
On Sat, 21 May 2022 at 01:04, Richard Henderson
wrote:
The err parameter is non-zero if and only if an error occured.
Use this instead of ret == -1 for determining if we need to
update the saved errno.
The gdb protocol isn't 100% clear on this, but what
On Sat, 21 May 2022 at 01:04, Richard Henderson
wrote:
>
> The err parameter is non-zero if and only if an error occured.
> Use this instead of ret == -1 for determining if we need to
> update the saved errno.
The gdb protocol isn't 100% clear on this, but what it says is:
https://sourceware.org/
The err parameter is non-zero if and only if an error occured.
Use this instead of ret == -1 for determining if we need to
update the saved errno.
This fixes the errno setting of SYS_ISTTY, which returns 0 on
error, not -1.
Signed-off-by: Richard Henderson
---
semihosting/arm-compat-semi.c | 2