diff mbox

[v1,1/1] m68k: Return semihosting errno values correctly

Message ID 1330121921-23462-1-git-send-email-meadori@codesourcery.com
State New
Headers show

Commit Message

Meador Inge Feb. 24, 2012, 10:18 p.m. UTC
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>
---
 m68k-semi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Andreas Färber Feb. 24, 2012, 10:53 p.m. UTC | #1
Am 24.02.2012 23:18, schrieb Meador Inge:
> 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>

Nice catch!

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

> ---
>  m68k-semi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/m68k-semi.c b/m68k-semi.c
> index bab01ee..6d60ced 100644
> --- a/m68k-semi.c
> +++ b/m68k-semi.c
> @@ -150,7 +150,7 @@ static void m68k_semi_cb(CPUState *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)					\
Meador Inge March 27, 2012, 3:07 p.m. UTC | #2
Ping.

On 02/24/2012 04:53 PM, Andreas Färber wrote:
> Am 24.02.2012 23:18, schrieb Meador Inge:
>> 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>
> 
> Nice catch!
> 
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> 
> Andreas
> 
>> ---
>>  m68k-semi.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/m68k-semi.c b/m68k-semi.c
>> index bab01ee..6d60ced 100644
>> --- a/m68k-semi.c
>> +++ b/m68k-semi.c
>> @@ -150,7 +150,7 @@ static void m68k_semi_cb(CPUState *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)					\
>
Peter Maydell March 27, 2012, 3:43 p.m. UTC | #3
This patch is simple enough (and m68k unmaintained enough)
that it could reasonably go through qemu-trivial I think.

-- PMM

On 27 March 2012 16:07, Meador Inge <meadori@codesourcery.com> wrote:
> Ping.
>
> On 02/24/2012 04:53 PM, Andreas Färber wrote:
>> Am 24.02.2012 23:18, schrieb Meador Inge:
>>> 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>
>>
>> Nice catch!
>>
>> Reviewed-by: Andreas Färber <afaerber@suse.de>
>>
>> Andreas
>>
>>> ---
>>>  m68k-semi.c |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/m68k-semi.c b/m68k-semi.c
>>> index bab01ee..6d60ced 100644
>>> --- a/m68k-semi.c
>>> +++ b/m68k-semi.c
>>> @@ -150,7 +150,7 @@ static void m68k_semi_cb(CPUState *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)                                      \
>>
>
>
> --
> Meador Inge
> CodeSourcery / Mentor Embedded
> http://www.mentor.com/embedded-software
>
Andreas Färber March 27, 2012, 3:51 p.m. UTC | #4
Am 27.03.2012 17:43, schrieb Peter Maydell:
> This patch is simple enough (and m68k unmaintained enough)
> that it could reasonably go through qemu-trivial I think.

This one's a Mentor-internal issue though - Paul, are you planning to
handle (your colleague's) m68k patches? Or should we downgrade m68k to
S: Orphan and handle them through some other to be defined way?

I'm asking because I have m68k QOM'ification in the queue and Anthony
has set out not to apply patches for which a submaintainer is defined.

Andreas
Peter Maydell Oct. 29, 2012, 9:42 a.m. UTC | #5
I just noticed this patch never got applied by anybody
(and alas it now needs a refresh because the file was renamed
in the interim.)

-- PMM

On 27 March 2012 16:43, Peter Maydell <peter.maydell@linaro.org> wrote:
> This patch is simple enough (and m68k unmaintained enough)
> that it could reasonably go through qemu-trivial I think.
>
> -- PMM
>
> On 27 March 2012 16:07, Meador Inge <meadori@codesourcery.com> wrote:
>> Ping.
>>
>> On 02/24/2012 04:53 PM, Andreas Färber wrote:
>>> Am 24.02.2012 23:18, schrieb Meador Inge:
>>>> 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>
>>>
>>> Nice catch!
>>>
>>> Reviewed-by: Andreas Färber <afaerber@suse.de>
>>>
>>> Andreas
>>>
>>>> ---
>>>>  m68k-semi.c |    2 +-
>>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/m68k-semi.c b/m68k-semi.c
>>>> index bab01ee..6d60ced 100644
>>>> --- a/m68k-semi.c
>>>> +++ b/m68k-semi.c
>>>> @@ -150,7 +150,7 @@ static void m68k_semi_cb(CPUState *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)                                      \
>>>
>>
>>
>> --
>> Meador Inge
>> CodeSourcery / Mentor Embedded
>> http://www.mentor.com/embedded-software
>>
Stefan Hajnoczi Oct. 29, 2012, 10:03 a.m. UTC | #6
On Mon, Oct 29, 2012 at 10:42 AM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> I just noticed this patch never got applied by anybody
> (and alas it now needs a refresh because the file was renamed
> in the interim.)

Merged, thanks!

https://github.com/stefanha/qemu/commits/trivial-patches

Please CC qemu-trivial when suggesting a patch goes through the trivial queue.

Stefan
diff mbox

Patch

diff --git a/m68k-semi.c b/m68k-semi.c
index bab01ee..6d60ced 100644
--- a/m68k-semi.c
+++ b/m68k-semi.c
@@ -150,7 +150,7 @@  static void m68k_semi_cb(CPUState *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)					\