From 2d9e3dd9be1de3bbdca113673084dd19a8d957c3 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Wed, 10 Jun 2020 09:51:53 +0200 Subject: hmp: Make json format optional for qom-set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 7d2ef6dcc1cf ("hmp: Simplify qom-set") switched to the json parser, making it possible to specify complex types. However, with this change it is no longer possible to specify proper sizes (e.g., 2G, 128M), turning the interface harder to use for properties that consume sizes. Let's switch back to the previous handling and allow to specify passing json via the "-j" parameter. Cc: Philippe Mathieu-Daudé Cc: Markus Armbruster Cc: Dr. David Alan Gilbert Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Signed-off-by: David Hildenbrand Message-Id: <20200610075153.33892-1-david@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hmp-commands.hx') diff --git a/hmp-commands.hx b/hmp-commands.hx index 28256209b5..60f395c276 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1806,9 +1806,10 @@ ERST { .name = "qom-set", - .args_type = "path:s,property:s,value:S", - .params = "path property value", - .help = "set QOM property", + .args_type = "json:-j,path:s,property:s,value:S", + .params = "[-j] path property value", + .help = "set QOM property.\n\t\t\t" + "-j: the value is specified in json format.", .cmd = hmp_qom_set, .flags = "p", }, -- cgit v1.2.3