All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: jasowang@redhat.com, qemu-devel@nongnu.org
Cc: David Woodhouse <dwmw@amazon.co.uk>,
	Hans <sungdgdhtryrt@gmail.com>,
	qemu-stable@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>
Subject: [PULL 1/1] net: Fix '-net nic,model=' for non-help arguments
Date: Mon, 12 Aug 2024 15:28:10 +0800	[thread overview]
Message-ID: <20240812072810.5247-2-jasowang@redhat.com> (raw)
In-Reply-To: <20240812072810.5247-1-jasowang@redhat.com>

From: David Woodhouse <dwmw@amazon.co.uk>

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>
---
 net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.42.0



  reply	other threads:[~2024-08-12  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12  7:28 [PULL 0/1] Net patches Jason Wang
2024-08-12  7:28 ` Jason Wang [this message]
2024-08-12 10:25   ` [PULL 1/1] net: Fix '-net nic,model=' for non-help arguments Peter Maydell
2024-08-12 10:30     ` David Woodhouse
2024-08-12 21:58 ` [PULL 0/1] Net patches Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240812072810.5247-2-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dwmw@amazon.co.uk \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=sungdgdhtryrt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.