qemu/scripts/qmp
Greg Kurz fe2f74af2b scripts/qmp/qom-set: fix the value argument passed to srv.command()
When invoking the script with -s, we end up passing a bogus value
to QEMU:

$ ./scripts/qmp/qom-set -s /var/tmp/qmp-sock-exp /machine.accel kvm
{}
$ ./scripts/qmp/qom-get -s /var/tmp/qmp-sock-exp /machine.accel
/var/tmp/qmp-sock-exp

This happens because sys.argv[2] isn't necessarily the command line
argument that holds the value. It is sys.argv[4] when -s was also
passed.

Actually, the code already has a variable to handle that. This patch
simply uses it.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <149373610338.5144.9635049015143453288.stgit@bahia.lan>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2017-05-23 13:28:17 +02:00
..
__init__.py scripts: add __init__.py file to scripts/qmp/ 2016-07-22 13:23:13 +05:30
qemu-ga-client scripts/qmp: Use Python 2.6 "except E as ..." syntax 2016-02-08 17:29:54 +01:00
qmp scripts/qmp: Use Python 2.6 "except E as ..." syntax 2016-02-08 17:29:54 +01:00
qmp-shell qmp-shell: improve help 2017-05-09 09:14:41 +02:00
qmp.py scripts: ensure monitor socket has SO_REUSEADDR set 2016-07-22 13:23:35 +05:30
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 scripts/qmp/qom-set: fix the value argument passed to srv.command() 2017-05-23 13:28:17 +02:00
qom-tree scripts: Add support for path as argument of qom-tree 2015-06-19 10:29:14 +02:00