[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists |
Date: |
Mon, 9 Nov 2020 19:59:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
On 09/11/20 19:38, Markus Armbruster wrote:
They are never qemu_opts_find'd with non-NULL id, so I'd say they are.
We also need to check qemu_opts_foreach().
Using qemu_opts_foreach means that e.g. -name id=... was not ignored
unlike -M id=.... However, it will be an error now. We have to check
if the callback or its callees use the opt->id
Reminder of how the affected options are affected:
reopen_opts in qemu-io-cmds.c qemu_opts_find(&reopen_opts, NULL)
empty_opts in qemu-io.c qemu_opts_find(&empty_opts, NULL)
qemu_rtc_opts qemu_find_opts_singleton("rtc")
qemu_machine_opts qemu_find_opts_singleton("machine")
qemu_boot_opts
QTAILQ_FIRST(&qemu_find_opts("bootopts")->head)
qemu_name_opts qemu_opts_foreach->parse_name
parse_name does not use id
qemu_mem_opts qemu_find_opts_singleton("memory")
qemu_icount_opts qemu_opts_foreach->do_configuree_icount
do_configure_icount->icount_configure
icount_configure does not use id
qemu_smp_opts
qemu_opts_find(qemu_find_opts("smp-opts"), NULL)
qemu_spice_opts QTAILQ_FIRST(&qemu_spice_opts.head)
To preempt your question, I can add this in the commit message. Anyway
I think it's relatively self-explanatory for most of these that they do
not need "id".
- merge_lists = false: singleton opts with NULL id; non-NULL id fails
Do you mean merge_lists = true here, and ...
- merge_lists = true: always return new opts; non-NULL id fails if dup
... = false here?
Of course. 1-1 in the brain fart competition.
Paolo
- Re: [PATCH v2 1/6] qemu-option: simplify search for end of key, (continued)
- [PATCH v2 3/6] qemu-option: restrict qemu_opts_set to merge-lists QemuOpts, Paolo Bonzini, 2020/11/09
- [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Paolo Bonzini, 2020/11/09
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Markus Armbruster, 2020/11/09
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Paolo Bonzini, 2020/11/09
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Markus Armbruster, 2020/11/09
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists,
Paolo Bonzini <=
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Markus Armbruster, 2020/11/10
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Paolo Bonzini, 2020/11/10
- Re: [PATCH v2 4/6] qemu-option: clean up id vs. list->merge_lists, Markus Armbruster, 2020/11/10
- [PATCH v2 5/6] qemu-option: move help handling to get_opt_name_value, Paolo Bonzini, 2020/11/09
- [PATCH v2 6/6] qemu-option: warn for short-form boolean options, Paolo Bonzini, 2020/11/09