From: David Woodhouse Date: Tue, 6 Aug 2024 17:21:37 +0000 (+0100) Subject: net: Fix '-net nic,model=' for non-help arguments X-Git-Tag: v9.0.3~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34163499459456b85282229910dd8babfb188472;p=thirdparty%2Fqemu.git 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 Signed-off-by: David Woodhouse Cc: qemu-stable@nongnu.org Reviewed-by: Michael Tokarev Signed-off-by: Jason Wang (cherry picked from commit fa62cb989a9146c82f8f172715042852f5d36200) Signed-off-by: Michael Tokarev --- diff --git a/net/net.c b/net/net.c index e6ca2529bb1..897bb936cf5 100644 --- a/net/net.c +++ b/net/net.c @@ -1748,7 +1748,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;