Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim, unescape module strings

2016-12-15 Thread Vlad Lungu
Sorry about replying to myself, I only had one coffee today. There is no need for mb_add_modstring(), we can simply do get_opt_value(tmpbuf,..) then mb_add_cmdline(, tmpbuf) Regards, Vlad On 12/15/2016 11:45 AM, Vlad Lungu wrote: > get_opt_value() truncates the value at the first comma >

[Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim, unescape module strings

2016-12-15 Thread Vlad Lungu
get_opt_value() truncates the value at the first comma Rename mb_add_cmdline() to mb_add_modstring() Unescape filename too Add new mb_add_cmdline() using memcpy() Signed-off-by: Vlad Lungu --- hw/i386/multiboot.c | 23 +-- 1 file changed, 17

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-15 Thread Vlad Lungu
On 12/15/2016 12:32 AM, Paolo Bonzini wrote: In other words: this fixes the mb_add_cmdline(kcmdline) case, and doesn't break comma escaping on the initrd case (because it was already broken). I don't see a problem with this patch. >>> ... there is one case of comma escaping that

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Paolo Bonzini
> > > In other words: this fixes the mb_add_cmdline(kcmdline) case, and > > > doesn't break comma escaping on the initrd case (because it was > > > already broken). I don't see a problem with this patch. > > > > ... there is one case of comma escaping that wasn't broken: > > > > $

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Eduardo Habkost
On Wed, Dec 14, 2016 at 04:38:07PM -0500, Paolo Bonzini wrote: > > > - Original Message - > > From: "Eduardo Habkost" > > To: "Paolo Bonzini" > > Cc: "Vlad Lungu" , qemu-devel@nongnu.org, > > r...@twiddle.net > >

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Paolo Bonzini
- Original Message - > From: "Eduardo Habkost" > To: "Paolo Bonzini" > Cc: "Vlad Lungu" , qemu-devel@nongnu.org, > r...@twiddle.net > Sent: Wednesday, December 14, 2016 6:51:44 PM > Subject: Re: [PATCH] multiboot:

[Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Vlad Lungu
get_opt_value() truncates the value at the first comma Use memcpy() instead Signed-off-by: Vlad Lungu --- hw/i386/multiboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 387caa6..b4495ad 100644

[Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Vlad Lungu
get_opt_value() truncates the value at the first comma. Use memcpy() instead. Signed-off-by: Vlad Lungu --- hw/i386/multiboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 387caa6..b4495ad 100644

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Eduardo Habkost
On Wed, Dec 14, 2016 at 06:20:46PM +0100, Paolo Bonzini wrote: > On 14/12/2016 18:00, Eduardo Habkost wrote: > > On Wed, Dec 14, 2016 at 05:55:07PM +0100, Paolo Bonzini wrote: > >> > >> > >> On 14/12/2016 17:19, Vlad Lungu wrote: > >>> get_opt_value() truncates the value at the first comma. > >>>

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Paolo Bonzini
On 14/12/2016 18:00, Eduardo Habkost wrote: > On Wed, Dec 14, 2016 at 05:55:07PM +0100, Paolo Bonzini wrote: >> >> >> On 14/12/2016 17:19, Vlad Lungu wrote: >>> get_opt_value() truncates the value at the first comma. >>> Use memcpy() instead. >> >> Looks good since get_opt_value is already used

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Eduardo Habkost
On Wed, Dec 14, 2016 at 05:55:07PM +0100, Paolo Bonzini wrote: > > > On 14/12/2016 17:19, Vlad Lungu wrote: > > get_opt_value() truncates the value at the first comma. > > Use memcpy() instead. > > Looks good since get_opt_value is already used by the caller. Have you > tested this with

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Paolo Bonzini
On 14/12/2016 17:19, Vlad Lungu wrote: > get_opt_value() truncates the value at the first comma. > Use memcpy() instead. Looks good since get_opt_value is already used by the caller. Have you tested this with multiple initrd modules too? Paolo > Signed-off-by: Vlad Lungu

Re: [Qemu-devel] [PATCH] multiboot: copy the cmdline verbatim

2016-12-14 Thread Eduardo Habkost
On Wed, Dec 14, 2016 at 03:35:29PM +0200, Vlad Lungu wrote: > > get_opt_value() truncates the value at the first comma > Use memcpy() instead > > Signed-off-by: Vlad Lungu Your patch is corrupted. I suggest using git-send-email instead of Thunderbird, but you might