All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Amos Kong <akong@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] qemu-kvm: jaso-parser: Output the content of invalid keyword
Date: Wed, 24 Mar 2010 11:29:40 +0100	[thread overview]
Message-ID: <20100324102940.GA22874@hall.aurel32.net> (raw)
In-Reply-To: <1269424853-15386-1-git-send-email-akong@redhat.com>

Hi,

On Wed, Mar 24, 2010 at 06:00:53PM +0800, Amos Kong wrote:
> 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.

Is this patch for QEMU or KVM? If it is for QEMU, you should put the
QEMU mailing list in Cc:. If it is for KVM, I don't have commit access
there.

> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  json-parser.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/json-parser.c b/json-parser.c
> index 579928f..98a82af 100644
> --- a/json-parser.c
> +++ b/json-parser.c
> @@ -12,6 +12,7 @@
>   */
>  
>  #include <stdbool.h>
> +#include <stdarg.h>
>  
>  #include "qemu-common.h"
>  #include "qstring.h"
> @@ -93,7 +94,11 @@ static int token_is_escape(QObject *obj, const char *value)
>   */
>  static void parse_error(JSONParserContext *ctxt, QObject *token, const char *msg, ...)
>  {
> -    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");
>  }
>  
>  /**
> -- 
> 1.6.3.3
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2010-03-24 10:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 10:00 [PATCH] qemu-kvm: jaso-parser: Output the content of invalid keyword Amos Kong
2010-03-24 10:29 ` Aurelien Jarno [this message]
2010-03-24 11:34   ` [PATCH] qemu: " Amos Kong
2010-03-24 11:34   ` [Qemu-devel] " Amos Kong
2010-03-24 14:03   ` [PATCH] qemu-kvm: " Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100324102940.GA22874@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=akong@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.