[Qemu-devel] [PATCH][RESEND] qemu: jaso-parser: Output the content of invalid keyword

2010-03-24 Thread Amos Kong
When input some invialid words in QMP port, qemu outputs this error message: parse error: invalid keyword `%s' This patch makes qemu output the content, like: parse error: invalid keyword `unknow_cmd' Signed-off-by: Amos Kong ak...@redhat.com --- json-parser.c |7 ++- 1 files changed, 6

Re: [Qemu-devel] [PATCH][RESEND] qemu: jaso-parser: Output the content of invalid keyword

2010-03-24 Thread Richard Henderson
On 03/24/2010 05:17 AM, Amos Kong wrote: -fprintf(stderr, parse error: %s\n, msg); +va_list ap; +va_start(ap, msg); +fprintf(stderr, parse error: ); +vfprintf(stderr, msg, ap); +fprintf(stderr, \n); Technically you need va_end here. r~