summaryrefslogtreecommitdiffstats
path: root/net.c
diff options
context:
space:
mode:
authorMarkus Armbruster <[email protected]>2010-02-10 19:52:18 +0100
committerMarkus Armbruster <[email protected]>2010-03-16 17:45:34 +0100
commit8212c64f0e1b32300b7ec4e79885a0caf6f521a6 (patch)
tree2faf279be4942f2c30b535f508cf51ee88a82844 /net.c
parent01e7f18869c9ee4c84793f4a39ec1f5f4128a0aa (diff)
downloadqemu-kvm-8212c64f0e1b32300b7ec4e79885a0caf6f521a6.tar.gz
qemu-kvm-8212c64f0e1b32300b7ec4e79885a0caf6f521a6.tar.bz2
qemu-kvm-8212c64f0e1b32300b7ec4e79885a0caf6f521a6.zip
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.
Diffstat (limited to 'net.c')
-rw-r--r--net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net.c b/net.c
index bb7ab1567..1092bdcaa 100644
--- a/net.c
+++ b/net.c
@@ -1159,7 +1159,7 @@ void net_host_device_add(Monitor *mon, const QDict *qdict)
return;
}
- 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 : "");
@@ -1364,7 +1364,7 @@ int net_client_parse(QemuOptsList *opts_list, const char *optarg)
}
#endif
- if (!qemu_opts_parse(opts_list, optarg, "type")) {
+ if (!qemu_opts_parse(opts_list, optarg, 1)) {
return -1;
}