qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when sett


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice
Date: Tue, 08 Jun 2010 12:32:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]