[libvirt] [PATCHv2] qemu: simplify use of HAVE_YAJL

2011-10-21 Thread Eric Blake
Rather than making all clients of monitor commands that are JSON-only check whether yajl support was compiled in, it is simpler to just avoid setting the capability bit up front if we can't use the capability. * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Only set capability bit if we

Re: [libvirt] [PATCHv2] qemu: simplify use of HAVE_YAJL

2011-10-23 Thread Wen Congyang
At 10/22/2011 12:48 AM, Eric Blake Write: > Rather than making all clients of monitor commands that are JSON-only > check whether yajl support was compiled in, it is simpler to just > avoid setting the capability bit up front if we can't use the capability. > > * src/qemu/qemu_capabilities.c (qemu

Re: [libvirt] [PATCHv2] qemu: simplify use of HAVE_YAJL

2011-10-26 Thread Eric Blake
On 10/23/2011 09:17 PM, Wen Congyang wrote: +#ifndef HAVE_YAJL +if (qemuCapsGet(info->flags, QEMU_CAPS_MONITOR_JSON)) +qemuCapsSet(flags, QEMU_CAPS_MONITOR_JSON); +#endif make syntax-check will fail here. It should be: # ifndef HAVE_YAJL ... # endif Yep, I noticed that (I had sen