[libvirt] [PATCH V1 1/6] Add QMP probing for TPM

Daniel P. Berrange berrange at redhat.com
Fri Mar 15 14:51:05 UTC 2013


On Fri, Mar 15, 2013 at 10:28:38AM -0400, Stefan Berger wrote:
> On 03/14/2013 10:47 AM, Daniel P. Berrange wrote:
> >On Thu, Mar 14, 2013 at 10:44:32AM -0400, Stefan Berger wrote:
> >>
> >>Hm, this surprises me since this would put JSON specific code into
> >>the monitor APIs (qemu_monitor.c) while qemu_monitor.c typically
> >>only serves as a dispatcher for either text monitor or json monitor.
> >No, you mis-understand me - I mean move the code into these 2 functions:
> 
> Sorry for bothering you about this one. If I was to move the code
> back into these functions, we'd end up with duplicate code in both
> functions. It's like having 100 lines of code while 50 + 10 do the
> same thing... You really want me to do this?

Yep, this makes the code for converting a JSON response into a
string array reusable from other functions that need it. The
duplication of the boilerplate for invoking commands is not
a new issue - same applies to all functions in this file, so
I'm not concerned about that. If we want to figure out a way
to minimise it, we should do it across all the APIs.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list