[PATCH 0/2] HMP: qom-get and set

Dr. David Alan Gilbert (git) posted 2 patches 3 years, 12 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200520151108.160598-1-dgilbert@redhat.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
hmp-commands.hx        | 14 ++++++++++++++
include/monitor/hmp.h  |  1 +
qom/qom-hmp-cmds.c     | 34 +++++++++++++++++++++++-----------
tests/qtest/test-hmp.c |  1 +
4 files changed, 39 insertions(+), 11 deletions(-)
[PATCH 0/2] HMP: qom-get and set
Posted by Dr. David Alan Gilbert (git) 3 years, 12 months ago
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

HMP has had a qom-set for a long time, but not a matching qom-get;
various attempts have been made to add one over the last 5 years.
Here's another go.

It's got simpler due to a suggestion by Markus to take the output
from qmp's qom-get.  While we're here, rework hmp's qom-set to be
a wrapper around the qmp equivalent, which simplifies it a bit.

In one post people didn't particularly like the use of JSON,
but in the intervening 4 years no one has implemented anything to
avoid it, and the output is trivially readable for non-structures
and still pretty readable for (the very rare) structures.

Dave

Dr. David Alan Gilbert (2):
  hmp: Implement qom-get HMP command
  hmp: Simplify qom_set

 hmp-commands.hx        | 14 ++++++++++++++
 include/monitor/hmp.h  |  1 +
 qom/qom-hmp-cmds.c     | 34 +++++++++++++++++++++++-----------
 tests/qtest/test-hmp.c |  1 +
 4 files changed, 39 insertions(+), 11 deletions(-)

-- 
2.26.2


Re: [PATCH 0/2] HMP: qom-get and set
Posted by Dr. David Alan Gilbert 3 years, 11 months ago
* Dr. David Alan Gilbert (git) (dgilbert@redhat.com) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> HMP has had a qom-set for a long time, but not a matching qom-get;
> various attempts have been made to add one over the last 5 years.
> Here's another go.
> 
> It's got simpler due to a suggestion by Markus to take the output
> from qmp's qom-get.  While we're here, rework hmp's qom-set to be
> a wrapper around the qmp equivalent, which simplifies it a bit.
> 
> In one post people didn't particularly like the use of JSON,
> but in the intervening 4 years no one has implemented anything to
> avoid it, and the output is trivially readable for non-structures
> and still pretty readable for (the very rare) structures.
> 
> Dave

Queued

> 
> Dr. David Alan Gilbert (2):
>   hmp: Implement qom-get HMP command
>   hmp: Simplify qom_set
> 
>  hmp-commands.hx        | 14 ++++++++++++++
>  include/monitor/hmp.h  |  1 +
>  qom/qom-hmp-cmds.c     | 34 +++++++++++++++++++++++-----------
>  tests/qtest/test-hmp.c |  1 +
>  4 files changed, 39 insertions(+), 11 deletions(-)
> 
> -- 
> 2.26.2
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK