]> Git Repo - qemu.git/commitdiff
linux-user: Special-case ERESTARTSYS in target_strerror()
authorPeter Maydell <[email protected]>
Mon, 6 Jun 2016 18:58:19 +0000 (19:58 +0100)
committerRiku Voipio <[email protected]>
Wed, 8 Jun 2016 09:06:57 +0000 (12:06 +0300)
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 <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
linux-user/syscall.c

index 262c645d3c56bceb33441a35084925bf53883249..bd8095c819aef269d9ae49afbbd06557cdcf43b4 100644 (file)
@@ -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;
     }
This page took 0.03276 seconds and 4 git commands to generate.