qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, armbru@redhat.com, stefanha@redhat.com,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v2] hmp: Allow for error message hints on HMP
Date: Wed, 19 Aug 2015 09:30:10 -0700	[thread overview]
Message-ID: <55D4AF12.1090604@redhat.com> (raw)
In-Reply-To: <1439934507-10346-1-git-send-email-eblake@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

On 08/18/2015 02:48 PM, Eric Blake wrote:
> Commits 7216ae3d and d2828429 disabled some error message hints,
> all because a change to use modern error reporting meant that the
> hint would be output prior to the actual error.  Fix this by making
> hints a first-class member of Error.
> 
> For example, we are now back to the pleasant:
> 
>  $ qemu-system-x86_64 --nodefaults -S --vnc :0 --chardev null,id=,
>  qemu-system-x86_64: --chardev null,id=,: Parameter 'id' expects an identifier
>  Identifiers consist of letters, digits, '-', '.', '_', starting with a letter.
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> 
> v2: use GString instead of rolling our own O(n^2) string concat [Paolo]
> 

> @@ -162,6 +191,7 @@ void error_free(Error *err)
>  {
>      if (err) {
>          g_free(err->msg);
> +        g_string_free(err->hint, true);

self-NAK; v3 coming up. g_string_free(NULL) doesn't work (I hate "free"
functions that aren't free-like).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      parent reply	other threads:[~2015-08-19 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18 21:48 [Qemu-devel] [PATCH v2] hmp: Allow for error message hints on HMP Eric Blake
2015-08-19 15:25 ` Paolo Bonzini
2015-08-19 16:30 ` Eric Blake [this message]

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=55D4AF12.1090604@redhat.com \
    --to=eblake@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 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).