* [PATCH] net: Do not include a newline in the id of -nic devices
@ 2020-05-18 7:43 Thomas Huth
2020-05-18 7:56 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2020-05-18 7:43 UTC (permalink / raw)
To: Jason Wang, qemu-devel; +Cc: qemu-trivial, qemu-stable
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@redhat.com>
---
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);
}
--
2.18.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: Do not include a newline in the id of -nic devices
2020-05-18 7:43 [PATCH] net: Do not include a newline in the id of -nic devices Thomas Huth
@ 2020-05-18 7:56 ` Philippe Mathieu-Daudé
2020-06-03 5:06 ` Philippe Mathieu-Daudé
2020-06-09 16:51 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-18 7:56 UTC (permalink / raw)
To: Thomas Huth, Jason Wang, qemu-devel; +Cc: qemu-trivial, qemu-stable
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 <thuth@redhat.com>
> ---
> 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é <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: Do not include a newline in the id of -nic devices
2020-05-18 7:43 [PATCH] net: Do not include a newline in the id of -nic devices Thomas Huth
2020-05-18 7:56 ` Philippe Mathieu-Daudé
@ 2020-06-03 5:06 ` Philippe Mathieu-Daudé
2020-06-09 16:51 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-03 5:06 UTC (permalink / raw)
To: Thomas Huth, Jason Wang, qemu-devel; +Cc: qemu-trivial, qemu-stable
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 <thuth@redhat.com>
> ---
> 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);
> }
>
>
ping?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: Do not include a newline in the id of -nic devices
2020-05-18 7:43 [PATCH] net: Do not include a newline in the id of -nic devices Thomas Huth
2020-05-18 7:56 ` Philippe Mathieu-Daudé
2020-06-03 5:06 ` Philippe Mathieu-Daudé
@ 2020-06-09 16:51 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-06-09 16:51 UTC (permalink / raw)
To: Thomas Huth, Jason Wang, qemu-devel; +Cc: qemu-trivial, qemu-stable
Le 18/05/2020 à 09:43, Thomas Huth a écrit :
> 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@redhat.com>
> ---
> 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);
> }
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-09 17:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18 7:43 [PATCH] net: Do not include a newline in the id of -nic devices Thomas Huth
2020-05-18 7:56 ` Philippe Mathieu-Daudé
2020-06-03 5:06 ` Philippe Mathieu-Daudé
2020-06-09 16:51 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).