Patchwork [39/60] m68k: Return semihosting errno values correctly

login
register
mail settings
Submitter Michael Tokarev
Date Feb. 4, 2013, 10:40 a.m.
Message ID <1359974470-17044-40-git-send-email-mjt@msgid.tls.msk.ru>
Download mbox | patch
Permalink /patch/217992/
State New
Headers show

Comments

Michael Tokarev - Feb. 4, 2013, 10:40 a.m.
From: Meador Inge <meadori@codesourcery.com>

Fixing a simple typo, s/errno/err/, that caused
the error status from GDB semihosted system calls
to be returned incorrectly.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
(cherry picked from commit aed91c1bff5e568c7b0fbd0e1e7e2f9e62409e73)

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 m68k-semi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/m68k-semi.c b/m68k-semi.c
index 3bb30cd..fed44ea 100644
--- a/m68k-semi.c
+++ b/m68k-semi.c
@@ -150,7 +150,7 @@  static void m68k_semi_cb(CPUM68KState *env, target_ulong ret, target_ulong err)
     }
     /* FIXME - handle put_user() failure */
     put_user_u32(ret, args);
-    put_user_u32(errno, args + 4);
+    put_user_u32(err, args + 4);
 }
 
 #define ARG(n)					\