diff options
author | Peter Krempa <pkrempa@redhat.com> | 2016-07-22 17:50:03 +0200 |
---|---|---|
committer | Peter Krempa <pkrempa@redhat.com> | 2016-07-27 09:40:07 +0200 |
commit | b7eef33df20dc19b3c70285ee29dabd2ee7391fa (patch) | |
tree | b85f44ce16a099b71c7849f1c30af92424616c38 /tests/qemucommandutiltest.c | |
parent | cd86d6f4656d01894141840531d61595e40e4682 (diff) | |
download | libvirt-b7eef33df20dc19b3c70285ee29dabd2ee7391fa.tar.gz |
util: qemu: Allow for different approaches to format JSON arrays
For use with memory hotplug virQEMUBuildCommandLineJSONRecurse attempted
to format JSON arrays as bitmap on the command line. Make the formatter
function configurable so that it can be reused with different syntaxes
of arrays such as numbered arrays for use with disk sources.
This patch extracts the code and adds a parameter for the function that
will allow to plug in different formatters.
Diffstat (limited to 'tests/qemucommandutiltest.c')
-rw-r--r-- | tests/qemucommandutiltest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c index 4872ea3bba..a5e315347f 100644 --- a/tests/qemucommandutiltest.c +++ b/tests/qemucommandutiltest.c @@ -51,7 +51,8 @@ testQemuCommandBuildFromJSON(const void *opaque) virAsprintf(&expect, ",%s", data->expectprops) < 0) return -1; - if (virQEMUBuildCommandLineJSON(val, &buf) < 0) { + if (virQEMUBuildCommandLineJSON(val, &buf, + virQEMUBuildCommandLineJSONArrayBitmap) < 0) { fprintf(stderr, "\nvirQEMUBuildCommandlineJSON failed process JSON:\n%s\n", data->props); |