Re: [libvirt] [PATCH 4/4] qemu: query command line options in QMP

2013-05-13 Thread Eric Blake
On 05/13/2013 02:35 AM, Osier Yang wrote: >> + >> +array = qemuMonitorGetOptions(mon); > > No need to get it when the options is cached. How about: > > if (!(array = qemuMonitorGetOptions(mon))) { > . > } Nicer indeed. > >> +if ((n = virJSONValueArraySize(array)) <

Re: [libvirt] [PATCH 4/4] qemu: query command line options in QMP

2013-05-13 Thread Osier Yang
On 27/04/13 05:01, Eric Blake wrote: Ever since the conversion to using only QMP for probing features of qemu 1.2 and newer, we have been unable to detect features that are added only by additional command line options. For example, we'd like to know if '-machine mem-merge=on' (added in qemu 1.5

Re: [libvirt] [PATCH 4/4] qemu: query command line options in QMP

2013-04-28 Thread Paolo Bonzini
Il 26/04/2013 23:01, Eric Blake ha scritto: > (for example, -net uses > an old-style parser, so it shows up with no parameters) This is not really correct. -net (and in 1.6, -drive will too) uses the same parser, but is a "polymorphic" option so it uses a different kind of validation. This shoul

[libvirt] [PATCH 4/4] qemu: query command line options in QMP

2013-04-26 Thread Eric Blake
Ever since the conversion to using only QMP for probing features of qemu 1.2 and newer, we have been unable to detect features that are added only by additional command line options. For example, we'd like to know if '-machine mem-merge=on' (added in qemu 1.5) is present. To do this, we will take