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

[qemu-xen stable-4.14] net: Do not include a newline in the id of -nic devices



commit c6414cb18315e4d043b6756faf9766fb0d8488bb
Author:     Thomas Huth <thuth@xxxxxxxxxx>
AuthorDate: Mon May 18 09:43:52 2020 +0200
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Mon Aug 24 18:55:57 2020 -0500

    net: Do not include a newline in the id of -nic devices
    
    The '\n' sneaked in by accident here, an "id" string should really
    not contain a newline character at the end.
    
    Fixes: 78cd6f7bf6b ('net: Add a new convenience option "--nic" ...')
    Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
    Message-Id: <20200518074352.23125-1-thuth@xxxxxxxxxx>
    Signed-off-by: Laurent Vivier <laurent@xxxxxxxxx>
    (cherry picked from commit 0561dfac082becdd9e89110249a27b309b62aa9f)
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index 38778e831d..cbeeeadff8 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1506,7 +1506,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\n", idx);
+        nd_id = g_strdup_printf("__org.qemu.nic%i", idx);
         qemu_opts_set_id(opts, nd_id);
     }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#stable-4.14



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.