On 06/08/2010 09:51 AM, Gerd Hoffmann wrote:
On 06/08/10 01:51, Anthony Liguori wrote:
Right now, if you set a QemuOpts option in a section twice, when
you get the option you'll receive the value that was set the first
time. This is less than ideal because if you're manipulating
options in two places like a global config followed by the command
line, you really want the later to override the former.
This patch fixes this behavior.
Note that this reverses the ordering for users which want multiple
values (slirp forwarding for example).
And qemu_opt_find seems to have thought about this too:
static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
{
QemuOpt *opt;
QTAILQ_FOREACH_REVERSE(opt, &opts->head, QemuOptHead, next) {
if (strcmp(opt->name, name) != 0)
continue;
return opt;
}
return NULL;
}
Can you show the behavior with commandline arguments only?
Paolo