linux-user: Special-case ERESTARTSYS in target_strerror()
Since TARGET_ERESTARTSYS and TARGET_ESIGRETURN are internal-to-QEMU error numbers, handle them specially in target_strerror(), to avoid confusing strace output like: 9521 rt_sigreturn(14,8,274886297808,8,0,268435456) = -1 errno=513 (Unknown error 513) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
7dcdaeafe0
commit
da2a34f7f9
@ -632,6 +632,13 @@ static inline int is_error(abi_long ret)
|
|||||||
|
|
||||||
const char *target_strerror(int err)
|
const char *target_strerror(int err)
|
||||||
{
|
{
|
||||||
|
if (err == TARGET_ERESTARTSYS) {
|
||||||
|
return "To be restarted";
|
||||||
|
}
|
||||||
|
if (err == TARGET_QEMU_ESIGRETURN) {
|
||||||
|
return "Successful exit from sigreturn";
|
||||||
|
}
|
||||||
|
|
||||||
if ((err >= ERRNO_TABLE_SIZE) || (err < 0)) {
|
if ((err >= ERRNO_TABLE_SIZE) || (err < 0)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user