qemu-patch-raspberry4/scripts/qmp
John Snow 6092c3ecc4 scripts: qmp-shell: Expand support for QMP expressions
This includes support for [] expressions, single-quotes in
QMP expressions (which is not strictly a part of JSON), and
the ability to use "True", "False" and "None" literals instead
of JSON's equivalent true, false, and null literals.

qmp-shell currently allows you to describe values as
JSON expressions:
key={"key":{"key2":"val"}}

But it does not currently support arrays, which are needed
for serializing and deserializing transactions:
key=[{"type":"drive-backup","data":{...}}]

qmp-shell also only currently accepts doubly quoted strings
as-per JSON spec, but QMP allows single quotes.

Lastly, python allows you to utilize "True" or "False" as
boolean literals, but JSON expects "true" or "false". Expand
qmp-shell to allow the user to type either, converting to the
correct type.

As a consequence of the above, the key=val parsing is also improved
to give better error messages if a key=val token is not provided.

CAVEAT: The parser is still extremely rudimentary and does not
expect to find spaces in {} nor [] expressions. This patch does
not improve this functionality.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Kashyap Chamarthy <kchamart@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2015-05-11 08:59:07 -04:00
..
qemu-ga-client Use qemu-project.org domain name 2013-10-11 09:34:56 -07:00
qmp QMP: add scripts/qmp 2013-09-18 08:57:02 -04:00
qmp-shell scripts: qmp-shell: Expand support for QMP expressions 2015-05-11 08:59:07 -04:00
qmp.py iotests: add QMP event waiting queue 2015-04-28 15:36:11 +02:00
qom-fuse QMP: add scripts/qmp 2013-09-18 08:57:02 -04:00
qom-get QMP: add scripts/qmp 2013-09-18 08:57:02 -04:00
qom-list QMP: add scripts/qmp 2013-09-18 08:57:02 -04:00
qom-set QMP: add scripts/qmp 2013-09-18 08:57:02 -04:00
qom-tree scripts: Add qom-tree script 2015-03-17 14:30:48 +01:00