* [Qemu-devel] [PATCH][STABLE] Fix corner case in chardev udp: parameter
@ 2010-01-15 20:07 Jan Kiszka
2010-01-18 9:24 ` Gerd Hoffmann
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2010-01-15 20:07 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Gerd Hoffmann, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
The missing '@' broke 'udp::<port>@:<port>' parsing.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
qemu-char.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index b13f8d4..a8a92f5 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2314,7 +2314,7 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
qemu_opt_set(opts, "backend", "udp");
if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port, &pos) < 2) {
host[0] = 0;
- if (sscanf(p, ":%32[^,]%n", port, &pos) < 1) {
+ if (sscanf(p, ":%32[^@,]%n", port, &pos) < 1) {
fprintf(stderr, "udp #1\n");
goto fail;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][STABLE] Fix corner case in chardev udp: parameter
2010-01-15 20:07 [Qemu-devel] [PATCH][STABLE] Fix corner case in chardev udp: parameter Jan Kiszka
@ 2010-01-18 9:24 ` Gerd Hoffmann
2010-01-18 10:21 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2010-01-18 9:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel
On 01/15/10 21:07, Jan Kiszka wrote:
> The missing '@' broke 'udp::<port>@:<port>' parsing.
> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) {
> host[0] = 0;
> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) {
> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) {
Indeed.
> fprintf(stderr, "udp #1\n");
While you are at it, can you also zap this debug leftover?
thanks,
Gerd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][STABLE] Fix corner case in chardev udp: parameter
2010-01-18 9:24 ` Gerd Hoffmann
@ 2010-01-18 10:21 ` Jan Kiszka
2010-01-18 10:47 ` Gerd Hoffmann
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2010-01-18 10:21 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Anthony Liguori, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Gerd Hoffmann wrote:
> On 01/15/10 21:07, Jan Kiszka wrote:
>> The missing '@' broke 'udp::<port>@:<port>' parsing.
>
>> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) {
>> host[0] = 0;
>> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) {
>> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) {
>
> Indeed.
>
>> fprintf(stderr, "udp #1\n");
>
> While you are at it, can you also zap this debug leftover?
Looks like there are three of them in qemu_chr_parse_compat - kill them all?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][STABLE] Fix corner case in chardev udp: parameter
2010-01-18 10:21 ` Jan Kiszka
@ 2010-01-18 10:47 ` Gerd Hoffmann
2010-01-18 11:15 ` [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2010-01-18 10:47 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel
On 01/18/10 11:21, Jan Kiszka wrote:
> Gerd Hoffmann wrote:
>> On 01/15/10 21:07, Jan Kiszka wrote:
>>> The missing '@' broke 'udp::<port>@:<port>' parsing.
>>
>>> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) {
>>> host[0] = 0;
>>> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) {
>>> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) {
>>
>> Indeed.
>>
>>> fprintf(stderr, "udp #1\n");
>>
>> While you are at it, can you also zap this debug leftover?
>
> Looks like there are three of them in qemu_chr_parse_compat - kill them all?
Yes.
thanks,
Gerd
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat
2010-01-18 10:47 ` Gerd Hoffmann
@ 2010-01-18 11:15 ` Jan Kiszka
2010-01-18 11:25 ` [Qemu-devel] " Gerd Hoffmann
2010-02-28 13:19 ` [Qemu-devel] " Aurelien Jarno
0 siblings, 2 replies; 7+ messages in thread
From: Jan Kiszka @ 2010-01-18 11:15 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Anthony Liguori, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]
Gerd Hoffmann wrote:
> On 01/18/10 11:21, Jan Kiszka wrote:
>> Gerd Hoffmann wrote:
>>> On 01/15/10 21:07, Jan Kiszka wrote:
>>>> The missing '@' broke 'udp::<port>@:<port>' parsing.
>>>
>>>> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) {
>>>> host[0] = 0;
>>>> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) {
>>>> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) {
>>>
>>> Indeed.
>>>
>>>> fprintf(stderr, "udp #1\n");
>>>
>>> While you are at it, can you also zap this debug leftover?
>>
>> Looks like there are three of them in qemu_chr_parse_compat - kill
>> them all?
>
> Yes.
>
> thanks,
> Gerd
>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
qemu-char.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index a8a92f5..ef7823f 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2315,7 +2315,6 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port, &pos) < 2) {
host[0] = 0;
if (sscanf(p, ":%32[^@,]%n", port, &pos) < 1) {
- fprintf(stderr, "udp #1\n");
goto fail;
}
}
@@ -2326,7 +2325,6 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
if (sscanf(p, "%64[^:]:%32[^,]%n", host, port, &pos) < 2) {
host[0] = 0;
if (sscanf(p, ":%32[^,]%n", port, &pos) < 1) {
- fprintf(stderr, "udp #2\n");
goto fail;
}
}
@@ -2354,7 +2352,6 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
}
fail:
- fprintf(stderr, "%s: fail on \"%s\"\n", __FUNCTION__, filename);
qemu_opts_del(opts);
return NULL;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat
2010-01-18 11:15 ` [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat Jan Kiszka
@ 2010-01-18 11:25 ` Gerd Hoffmann
2010-02-28 13:19 ` [Qemu-devel] " Aurelien Jarno
1 sibling, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2010-01-18 11:25 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel
>>>> While you are at it, can you also zap this debug leftover?
>>>
>>> Looks like there are three of them in qemu_chr_parse_compat - kill
>>> them all?
>>
>> Yes.
>>
>> thanks,
>> Gerd
>>
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
> - fprintf(stderr, "udp #1\n");
> - fprintf(stderr, "udp #2\n");
> - fprintf(stderr, "%s: fail on \"%s\"\n", __FUNCTION__, filename);
cheers,
Gerd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat
2010-01-18 11:15 ` [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat Jan Kiszka
2010-01-18 11:25 ` [Qemu-devel] " Gerd Hoffmann
@ 2010-02-28 13:19 ` Aurelien Jarno
1 sibling, 0 replies; 7+ messages in thread
From: Aurelien Jarno @ 2010-02-28 13:19 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, Gerd Hoffmann, qemu-devel
On Mon, Jan 18, 2010 at 12:15:01PM +0100, Jan Kiszka wrote:
> Gerd Hoffmann wrote:
> > On 01/18/10 11:21, Jan Kiszka wrote:
> >> Gerd Hoffmann wrote:
> >>> On 01/15/10 21:07, Jan Kiszka wrote:
> >>>> The missing '@' broke 'udp::<port>@:<port>' parsing.
> >>>
> >>>> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port,&pos)< 2) {
> >>>> host[0] = 0;
> >>>> - if (sscanf(p, ":%32[^,]%n", port,&pos)< 1) {
> >>>> + if (sscanf(p, ":%32[^@,]%n", port,&pos)< 1) {
> >>>
> >>> Indeed.
> >>>
> >>>> fprintf(stderr, "udp #1\n");
> >>>
> >>> While you are at it, can you also zap this debug leftover?
> >>
> >> Looks like there are three of them in qemu_chr_parse_compat - kill
> >> them all?
> >
> > Yes.
> >
> > thanks,
> > Gerd
> >
Thanks, committed to HEAD and cherry-picked in stable-0.12.
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> qemu-char.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index a8a92f5..ef7823f 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -2315,7 +2315,6 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
> if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port, &pos) < 2) {
> host[0] = 0;
> if (sscanf(p, ":%32[^@,]%n", port, &pos) < 1) {
> - fprintf(stderr, "udp #1\n");
> goto fail;
> }
> }
> @@ -2326,7 +2325,6 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
> if (sscanf(p, "%64[^:]:%32[^,]%n", host, port, &pos) < 2) {
> host[0] = 0;
> if (sscanf(p, ":%32[^,]%n", port, &pos) < 1) {
> - fprintf(stderr, "udp #2\n");
> goto fail;
> }
> }
> @@ -2354,7 +2352,6 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
> }
>
> fail:
> - fprintf(stderr, "%s: fail on \"%s\"\n", __FUNCTION__, filename);
> qemu_opts_del(opts);
> return NULL;
> }
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-02-28 13:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 20:07 [Qemu-devel] [PATCH][STABLE] Fix corner case in chardev udp: parameter Jan Kiszka
2010-01-18 9:24 ` Gerd Hoffmann
2010-01-18 10:21 ` Jan Kiszka
2010-01-18 10:47 ` Gerd Hoffmann
2010-01-18 11:15 ` [Qemu-devel] [PATCH][STABLE] Drop debug printfs from qemu_chr_parse_compat Jan Kiszka
2010-01-18 11:25 ` [Qemu-devel] " Gerd Hoffmann
2010-02-28 13:19 ` [Qemu-devel] " Aurelien Jarno
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).