aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2024-08-06 18:21:37 +0100
committerJason Wang <jasowang@redhat.com>2024-08-12 13:36:42 +0800
commitfa62cb989a9146c82f8f172715042852f5d36200 (patch)
tree0942fcb6b3a10860750cea92db9d816084f35abf /net
parent0f397dcfecc9211d12c2c720c01eb32f0eaa7d23 (diff)
net: Fix '-net nic,model=' for non-help arguments
Oops, don't *delete* the model option when checking for 'help'. Fixes: 64f75f57f9d2 ("net: Reinstate '-net nic, model=help' output as documented in man page") Reported-by: Hans <sungdgdhtryrt@gmail.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Cc: qemu-stable@nongnu.org Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 2eb8bc9c0b..fc1125111c 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1737,7 +1737,7 @@ void net_check_clients(void)
static int net_init_client(void *dummy, QemuOpts *opts, Error **errp)
{
- const char *model = qemu_opt_get_del(opts, "model");
+ const char *model = qemu_opt_get(opts, "model");
if (is_nic_model_help_option(model)) {
return 0;