[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] semihosting: add --semihosting-config arg s
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] semihosting: add --semihosting-config arg sub-argument |
Date: |
Thu, 7 May 2015 13:42:44 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 07/05/2015 13:35, Liviu Ionescu wrote:
>
>> On 07 May 2015, at 15:21, Leon Alrae <address@hidden> wrote:
>>
>> On 07/05/2015 12:50, Liviu Ionescu wrote:
>>>
>>>> On 07 May 2015, at 12:52, Leon Alrae <address@hidden> wrote:
>>>>
>>>>> is it that difficult to count the "arg"s and correctly alloc the array?
>>>>
>>>> This probably would require going through the list twice
>>>
>>> the code to iterate is already there, for other options, you just need to
>>> add a branch to the existing case.
>>
>> Do you mean modifying QEMU option parser?
>
> not at all.
>
> option parsing is done anyway in two passes. the first pass is a short loop,
> used to identify nodeconfig & nouserconfig. the second pass is the big
> for(;;) loop. you can use this first pass to count the number of args,
> similarly as I did in my patch.
>
I think parsing -semihosting-config sub-options should happen inside
"case QEMU_OPTION_semihosting_config", just to be consistent with other
options.
Leon
Re: [Qemu-devel] [PATCH 0/4] semihosting: clean up and add --semihosting-config arg, Liviu Ionescu, 2015/05/06