qemu-option: Move the implied first name into QemuOptsList

We sometimes permit omitting the first option name, for example
-device foo is short for -device driver=foo.  The name to use
("driver" in the example) is passed as argument to qemu_opts_parse().
For each QemuOptsList, we use at most one such name.

Move the name into QemuOptsList, and pass whether to permit the
abbreviation.  This ensures continued consistency, and simplifies the
commit after next in this series.
This commit is contained in:
Markus Armbruster 2010-02-10 19:52:18 +01:00
parent 01e7f18869
commit 8212c64f0e
8 changed files with 24 additions and 13 deletions

View file

@ -54,7 +54,7 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
return NULL;
}
opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", NULL);
opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
if (!opts) {
monitor_printf(mon, "parsing network options '%s' failed\n",
opts_str ? opts_str : "");