[libvirt] [PATCH 1/5] qemu: don't override earlier json error

Michal Privoznik mprivozn at redhat.com
Mon Feb 25 10:39:09 UTC 2013


On 23.02.2013 00:09, Eric Blake wrote:
> I built without json support, and noticed a strange failure message
> in qemumonitorjsontest:
> 
> 2013-02-22 16:12:37.503+0000: 19812: error : virJSONValueToString:1119 : internal error No JSON parser implementation is available
> 2013-02-22 16:12:37.503+0000: 19812: error : qemuMonitorJSONCommandWithFd:253 : out of memory
> 
> While a later patch will fix the test to skip when json is not present,
> this patch avoids overriding the more useful error message from
> virJSONValueToString returning NULL.
> 
> * src/qemu/qemu_monitor_json.c (qemuMonitorJSONCommandWithFd):
> Don't override message.
> (qemuMonitorJSONCheckError): Don't print NULL.
> * src/qemu/qemu_agent.c (qemuAgentCommand): Don't override message.
> (qemuAgentCheckError): Don't print NULL.
> (qemuAgentArbitraryCommand): Properly fail on OOM.
> ---
>  src/qemu/qemu_agent.c        | 13 ++++++-------
>  src/qemu/qemu_monitor_json.c |  8 +++-----
>  2 files changed, 9 insertions(+), 12 deletions(-)

ACK

Michal




More information about the libvir-list mailing list