[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice |
Date: |
Mon, 7 Jun 2010 18:51:49 -0500 |
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.
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/qemu-option.c b/qemu-option.c
index acd74f9..e0cb91b 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -628,7 +628,7 @@ int qemu_opt_set(QemuOpts *opts, const char *name, const
char *value)
opt = qemu_mallocz(sizeof(*opt));
opt->name = qemu_strdup(name);
opt->opts = opts;
- QTAILQ_INSERT_TAIL(&opts->head, opt, next);
+ QTAILQ_INSERT_HEAD(&opts->head, opt, next);
if (desc[i].name != NULL) {
opt->desc = desc+i;
}
--
1.7.0.4
- [Qemu-devel] [PATCH 0/22] Refactor machine support, Anthony Liguori, 2010/06/07
- [Qemu-devel] [PATCH 03/22] QemuOpts: add function to set QemuOpts from defaults, Anthony Liguori, 2010/06/07
- [Qemu-devel] [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice,
Anthony Liguori <=
- Re: [Qemu-devel] [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Gerd Hoffmann, 2010/06/08
- [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Paolo Bonzini, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Anthony Liguori, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Gerd Hoffmann, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Anthony Liguori, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Gerd Hoffmann, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Anthony Liguori, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Gerd Hoffmann, 2010/06/09
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Paul Brook, 2010/06/08
- Re: [Qemu-devel] Re: [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, Anthony Liguori, 2010/06/08