From: Leon Alrae <leon.alrae@imgtec.com>
To: Liviu Ionescu <ilg@livius.net>
Cc: peter.maydell@linaro.org, christopher.covington@linaro.org,
qemu-devel@nongnu.org, matthew.fortune@imgtec.com
Subject: Re: [Qemu-devel] [PATCH 4/4] semihosting: add --semihosting-config arg sub-argument
Date: Thu, 7 May 2015 13:42:44 +0100 [thread overview]
Message-ID: <554B5DC4.3070902@imgtec.com> (raw)
In-Reply-To: <1DC3FF37-E92C-446C-9111-1F768D073EB5@livius.net>
On 07/05/2015 13:35, Liviu Ionescu wrote:
>
>> On 07 May 2015, at 15:21, Leon Alrae <leon.alrae@imgtec.com> wrote:
>>
>> On 07/05/2015 12:50, Liviu Ionescu wrote:
>>>
>>>> On 07 May 2015, at 12:52, Leon Alrae <leon.alrae@imgtec.com> 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
next prev parent reply other threads:[~2015-05-07 12:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 14:57 [Qemu-devel] [PATCH 0/4] semihosting: clean up and add --semihosting-config arg Leon Alrae
2015-05-06 14:57 ` [Qemu-devel] [PATCH 1/4] semihosting: remove semihosting_enabled declaration from sysemu.h Leon Alrae
2015-05-06 14:57 ` [Qemu-devel] [PATCH 2/4] semihosting: remove semihosting_target declaration from gdbstub.h Leon Alrae
2015-05-06 14:57 ` [Qemu-devel] [PATCH 3/4] semihosting: create SemihostingConfig struct Leon Alrae
2015-05-06 14:57 ` [Qemu-devel] [PATCH 4/4] semihosting: add --semihosting-config arg sub-argument Leon Alrae
2015-05-07 6:51 ` Liviu Ionescu
2015-05-07 9:52 ` Leon Alrae
2015-05-07 11:50 ` Liviu Ionescu
2015-05-07 12:21 ` Leon Alrae
2015-05-07 12:35 ` Liviu Ionescu
2015-05-07 12:42 ` Leon Alrae [this message]
2015-05-06 15:22 ` [Qemu-devel] [PATCH 0/4] semihosting: clean up and add --semihosting-config arg Liviu Ionescu
2015-05-06 16:12 ` Leon Alrae
2015-05-13 5:48 ` Liviu Ionescu
2015-05-13 9:29 ` Leon Alrae
2015-05-13 9:44 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554B5DC4.3070902@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=christopher.covington@linaro.org \
--cc=ilg@livius.net \
--cc=matthew.fortune@imgtec.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).