diff mbox series

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

Message ID 1615529786-30763-5-git-send-email-jasowang@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/16] virtio-net: calculating proper msix vectors on init | expand

Commit Message

Jason Wang March 12, 2021, 6:16 a.m. UTC
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 mbox series

Patch

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);
     }