Re: [PATCH] virsh: add qemu-monitor-command --pretty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/08/2012 03:32 PM, Dave Allan wrote:
> On Thu, Oct 04, 2012 at 05:22:20PM -0600, Eric Blake wrote:
>> I was using qemu-monitor-command during development, and found it quite
>> hard to use.  Compare the results of this patch on ease of reading:
>>

>> Note that 'qemu-monitor-command dom --pretty --hmp info version'
>> happens to truncate 0.12.1(qemu-kvm-0.12.1.2) into just 0.12 (since
>> that is the portion of the prefix of the string that forms a valid
>> JSON subsequence); we probably have a bug in virJSONValueFromString
>> for not rejecting trailing junk, but that's a matter for another
>> patch; for now, I just documented that --hmp and --pretty don't
>> make sense together in the man page.
> 
> I'd tweak the patch to reject the combination of --hmp and --pretty;
> other than that it looks like a great readability enhancement.

Done, and pushed.  (I suppose if you still target a really old qemu
where --hmp is a no-op because there is no qmp monitor, then --pretty in
isolation will still truncate the HMP result from that command, but
that's more of a corner case that I can still live with).

>>
>> -=item B<qemu-monitor-command> I<domain> [I<--hmp>] I<command>...
>> +=item B<qemu-monitor-command> I<domain> { [I<--hmp>] | [I<--pretty>] }

In fact, I had already documented them as mutually exclusive :)

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]