On Wed, Aug 29, 2012 at 1:38 PM, Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 22 August 2012 19:03, Max Filippov <jcmvb...@gmail.com> wrote:
>> --- a/target-xtensa/xtensa-semi.c
>> +++ b/target-xtensa/xtensa-semi.c
>> @@ -218,6 +218,8 @@ void HELPER(simcall)(CPUXtensaState *env)
>>
>>      default:
>>          qemu_log("%s(%d): not implemented\n", __func__, regs[2]);
>> +        regs[2] = -1;
>> +        regs[3] = ENOSYS;
>>          break;
>>      }
>
> This doesn't look right -- ENOSYS is a host errno, and may vary
> between host OSes and CPU architectures. I would have thought you'd
> want to return a value defined by whatever guest ABI we're
> emulating here.

That means also converting errno after open/close/read/write...
Is there a way to reuse linux-user errno convertor in the softmmu target?

-- 
Thanks.
-- Max

Reply via email to