From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS6Fs-0001vw-06 for qemu-devel@nongnu.org; Wed, 19 Aug 2015 12:30:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS6Fo-0006EA-Oe for qemu-devel@nongnu.org; Wed, 19 Aug 2015 12:30:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS6Fo-0006DY-6b for qemu-devel@nongnu.org; Wed, 19 Aug 2015 12:30:20 -0400 References: <1439934507-10346-1-git-send-email-eblake@redhat.com> From: Eric Blake Message-ID: <55D4AF12.1090604@redhat.com> Date: Wed, 19 Aug 2015 09:30:10 -0700 MIME-Version: 1.0 In-Reply-To: <1439934507-10346-1-git-send-email-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JGsWOFHP9XUPl5uLIHF0ljPagvavO5TW2" Subject: Re: [Qemu-devel] [PATCH v2] hmp: Allow for error message hints on HMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, armbru@redhat.com, stefanha@redhat.com, afaerber@suse.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JGsWOFHP9XUPl5uLIHF0ljPagvavO5TW2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > For example, we are now back to the pleasant: >=20 > $ qemu-system-x86_64 --nodefaults -S --vnc :0 --chardev null,id=3D, > qemu-system-x86_64: --chardev null,id=3D,: Parameter 'id' expects an i= dentifier > Identifiers consist of letters, digits, '-', '.', '_', starting with a= letter. >=20 > Signed-off-by: Eric Blake > --- >=20 > v2: use GString instead of rolling our own O(n^2) string concat [Paolo]= >=20 > @@ -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). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JGsWOFHP9XUPl5uLIHF0ljPagvavO5TW2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV1K8aAAoJEKeha0olJ0Nqs0UH/RXQ+PRQT+xO5ALjFjexwoXI SBCFFrgwG94uznuh+dvCE2td0w0X3euF6RIW5wrZffBbR09VJmHpv7uA1YsEpRzM M1Uqh1m4KDCaWjA8yO9Z8p9H7bJ67YbI2Q+HeU+nNxiavTxitHjgVP1Dkj3NWahO NwJO6tPWcjQ5+sGc9z11+w06D+Bxr6SRAF7NSKEStkh+x/9nJsfG2ZNvp5CpRNKL EyjEPdgTgMzrjJg6N6Cv1K4ZxR0AwkW3otbTHkFurhMrfLPcV6vRCR18wobZyJo6 xIpbwHShzOpzFqwt17nTk/+ESFWOClG6P6KldQ29KOybyQMvY2xdzr9Ro+rZG3A= =8kqN -----END PGP SIGNATURE----- --JGsWOFHP9XUPl5uLIHF0ljPagvavO5TW2--