diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-06 19:58:19 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-06-08 12:06:57 +0300 |
commit | da2a34f7f9999da09f6c307b40b66eba8cc38283 (patch) | |
tree | 8143433a8cafa45a4eff948cef87f80b6ff0ea44 /linux-user/syscall.c | |
parent | 7dcdaeafe07dd87079c4e073bced4cfc8bf5fdf3 (diff) |
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>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 262c645d3c..bd8095c819 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -632,6 +632,13 @@ static inline int is_error(abi_long ret) 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)) { return NULL; } |