Message ID | 20240812072810.5247-2-jasowang@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,1/1] net: Fix '-net nic,model=' for non-help arguments | expand |
On Mon, 12 Aug 2024 at 08:29, Jason Wang <jasowang@redhat.com> wrote: > > 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; Will this also fix https://gitlab.com/qemu-project/qemu/-/issues/2496 ? thanks -- PMM
On Mon, 2024-08-12 at 11:25 +0100, Peter Maydell wrote: > > Will this also fix > https://gitlab.com/qemu-project/qemu/-/issues/2496 ? Almost certainly, yes.
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;