[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/22] QemuOpts: make qemu_opts_validate() store the
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 02/22] QemuOpts: make qemu_opts_validate() store the description list for later use |
Date: |
Mon, 7 Jun 2010 18:51:50 -0500 |
Otherwise qemu_opt_set doesn't work as expected after a validate call
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/qemu-option.c b/qemu-option.c
index e0cb91b..03b1ef7 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -525,6 +525,7 @@ struct QemuOpt {
struct QemuOpts {
char *id;
QemuOptsList *list;
+ const QemuOptDesc *secondary_desc;
Location loc;
QTAILQ_HEAD(QemuOptHead, QemuOpt) head;
QTAILQ_ENTRY(QemuOpts) next;
@@ -611,6 +612,10 @@ int qemu_opt_set(QemuOpts *opts, const char *name, const
char *value)
const QemuOptDesc *desc = opts->list->desc;
int i;
+ if (desc[0].name == NULL && opts->secondary_desc) {
+ desc = opts->secondary_desc;
+ }
+
for (i = 0; desc[i].name != NULL; i++) {
if (strcmp(desc[i].name, name) == 0) {
break;
@@ -927,6 +932,8 @@ int qemu_opts_validate(QemuOpts *opts, const QemuOptDesc
*desc)
}
}
+ opts->secondary_desc = desc;
+
return 0;
}
--
1.7.0.4
- Re: [Qemu-devel] [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice, (continued)
- 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
[Qemu-devel] [PATCH 02/22] QemuOpts: make qemu_opts_validate() store the description list for later use,
Anthony Liguori <=
[Qemu-devel] [PATCH 04/22] machine: package all init arguments into a QemuOpts (v2), Anthony Liguori, 2010/06/07
[Qemu-devel] [PATCH 07/22] machine: introduce -machine option, Anthony Liguori, 2010/06/07
[Qemu-devel] [PATCH 09/22] machine: implement -m in terms of -machine, Anthony Liguori, 2010/06/07
[Qemu-devel] [PATCH 08/22] machine: implement -kernel/-append/-initrd options in term of -machine, Anthony Liguori, 2010/06/07
[Qemu-devel] [PATCH 10/22] machine: allow boards to specify default values and use it in isapc, Anthony Liguori, 2010/06/07
[Qemu-devel] [PATCH 05/22] machine: pass all init options as a single QemuOpts, Anthony Liguori, 2010/06/07