qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 04/16] net: unbreak well-form id check for "-nic"


From: Jason Wang
Subject: [PULL 04/16] net: unbreak well-form id check for "-nic"
Date: Fri, 12 Mar 2021 14:16:14 +0800

The auto genreated id for "-nic" has "_" prefix which can't satisfy
the well-formed id check that is introduced by
871579b9834aca517dc2d4941691a1d2082db6f2 ("net: validate that ids are
well formed"). Fix this by simply removing the "__" prefix.

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 d36729f..254b42f 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1479,7 +1479,7 @@ static int net_param_nic(void *dummy, QemuOpts *opts, 
Error **errp)
     /* Create an ID if the user did not specify one */
     nd_id = g_strdup(qemu_opts_id(opts));
     if (!nd_id) {
-        nd_id = g_strdup_printf("__org.qemu.nic%i", idx);
+        nd_id = g_strdup_printf("org.qemu.nic%i", idx);
         qemu_opts_set_id(opts, nd_id);
     }
 
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]