[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] hmp: Allow for error message hints on HMP
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2] hmp: Allow for error message hints on HMP |
Date: |
Wed, 19 Aug 2015 09:30:10 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
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 <address@hidden>
> ---
>
> 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
signature.asc
Description: OpenPGP digital signature