Re: [PATCH v4 10/53] semihosting: Adjust error checking in common_semi_cb

2022-06-08 Thread Alex Bennée
Richard Henderson writes: > 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 Hender

[PATCH v4 10/53] semihosting: Adjust error checking in common_semi_cb

2022-06-07 Thread Richard Henderson
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