Markus Armbruster cb77d1925a qemu-option: Guard against qemu_opts_set_defaults() misuse
Commit 6d4cd40 fixed qemu_opts_set_defaults() for an existing corner
case, but broke it for another one that can't be reached in current
code.

Quote from its commit message:

    I believe [opts_parse()] attempts to do the following:

        If options don't yet exist, create new options
        Else, if defaults, modify the existing options
        Else, if list->merge_lists, modify the existing options
        Else, fail

The only caller that passes true for defaults is
qemu_opts_set_defaults().

The commit message then claims:

    A straightforward call of qemu_opts_create() does exactly that.

Wrong.  When !list->merge_lists, and the option string doesn't contain
id=, and options without ID exist, then we don't actually modify the
existing options, we create new ones.

Not reachable, because we never pass lists with !list->merge_lists to
qemu_opts_set_defaults().

Guard against possible (if unlikely) future misuse with assert().

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1375428840-5275-1-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12 09:15:37 -05:00
2013-08-12 09:15:11 -05:00
2013-07-09 13:38:56 -05:00
2013-08-12 08:32:55 -05:00
2013-08-12 08:32:55 -05:00
2013-07-30 23:11:07 +01:00
2013-08-07 12:48:00 -05:00
2013-07-26 22:01:31 +02:00
2013-07-30 23:11:07 +01:00
2013-08-05 08:06:25 -05:00
2013-05-03 13:58:09 +02:00
2013-07-30 10:25:47 +02:00
2013-06-11 23:45:43 +04:00
2013-07-18 08:17:42 -07:00
2013-07-23 11:12:00 +02:00
2013-07-29 17:07:37 +02:00
2013-08-05 08:06:25 -05:00
2013-07-27 11:22:53 +04:00
2013-07-31 21:03:59 +02:00
2013-07-23 02:41:31 +02:00
2013-07-15 09:49:00 +02:00
2013-08-12 09:15:12 -05:00
2013-07-23 11:12:00 +02:00
2013-06-14 15:33:10 +01:00
2013-08-02 18:05:16 +04:00
2013-05-03 13:05:49 +02:00
2013-05-18 16:35:12 +04:00
2013-06-06 11:27:05 +02:00
2013-07-19 12:52:03 +04:00
2013-05-01 13:06:07 +02:00
2013-05-03 12:04:40 -05:00
2013-07-23 11:11:59 +02:00
2013-08-07 15:38:31 -05:00
2013-07-30 10:25:47 +02:00
2013-07-04 17:42:45 +02:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme 528 MiB
Languages
C 82.5%
C++ 7%
Python 3.3%
Dylan 2.8%
Shell 1.5%
Other 2.6%