qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] net: Do not include a newline in the id of -nic devices


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] net: Do not include a newline in the id of -nic devices
Date: Mon, 18 May 2020 09:56:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 5/18/20 9:43 AM, Thomas Huth wrote:
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 <address@hidden>
---
  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);
      }

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>




reply via email to

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