From 8212c64f0e1b32300b7ec4e79885a0caf6f521a6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 10 Feb 2010 19:52:18 +0100 Subject: 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. --- net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net.c') diff --git a/net.c b/net.c index bb7ab15..1092bdc 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; } -- cgit v1.1