[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] Support 'help' as a synonym for '?' in comma
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2] Support 'help' as a synonym for '?' in command line options |
Date: |
Thu, 2 Aug 2012 10:10:04 +0100 |
On 2 August 2012 10:03, Markus Armbruster <address@hidden> wrote:
>> - if (*optarg == '?') {
>> + if (is_help_option(optarg)) {
>> show_valid_cards:
>
> "-soundhw ?junk" now goes through the "bad card name" path instead of
> the "help" path. Fine with me.
Yeah, I assumed that treating '?junk' like '?' was basically a bug
due to lazy coding, but I should call it out in the commit message
as a behaviour change I guess.
>> @@ -825,8 +825,8 @@ int main(int argc, char **argv)
>> qemu_uname_release = argv[optind++];
>> } else if (!strcmp(r, "cpu")) {
>> cpu_model = argv[optind++];
>> - if (strcmp(cpu_model, "?") == 0) {
>> -/* XXX: implement xxx_cpu_list for targets that still miss it */
>> + if (is_help_option(cpu_model)) {
>> + /* XXX: implement xxx_cpu_list for targets that still miss
>> it */
>
> I wouldn't reindent this line.
I have a feeling checkpatch complained or I probably wouldn't have.
I'll put it back though.
>
> if (!driver || !qemu_opt_get(opts, "?")) {
> return 0;
> }
>
> I'm afraid you missed this one. Please test both
>
> -device \?
> -device e1000,\?
>
> as well as
>
> -device i6300esb
> -device i6300esb,addr=9
> -device i6300esb,romfile=\?
>
> The last one is expected to fail (failed to find romfile "?").
OK.
>> + * Check whether @s is one of the standard strings which indicate
>> + * that the user is asking for a list of the valid values for a
>> + * command option like -cpu or -M. The current accepted strings
>> + * are 'help' and '?'.
>
> Good opportunity to document that '?' is deprecated.
Agreed.
-- PMM