On Tue, May 31, 2016 at 09:43:12 -0400, John Ferlan wrote: > > > On 05/31/2016 07:56 AM, Peter Krempa wrote: > > On Fri, May 27, 2016 at 09:57:07 -0400, John Ferlan wrote: > >> Move the module from qemu_command.c to virjson.c and rename to > >> virJSONBuildObjectCommandline. > >> > >> Nothing in the API is "specific" to the qemuBuild* processing and it'll > >> be useful to "share" with upcoming changes in the storage_backend which > >> will build a secret object for the 'qemu-img' command. > > > > It's very specific to qemu. Either qemu-img or qemu itself it's still > > qemu. > > > >> Also virJSONValueObjectForeachKeyValue and virJSONValueGetArrayAsBitmap > >> can be static helpers. > >> > >> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > >> --- > >> src/libvirt_private.syms | 3 +- > >> src/qemu/qemu_command.c | 124 +++----------------------------------------- > >> src/qemu/qemu_command.h | 4 -- > >> src/util/virjson.c | 117 +++++++++++++++++++++++++++++++++++++++-- > >> src/util/virjson.h | 12 ++--- > >> tests/qemucommandutiltest.c | 7 +-- > >> 6 files changed, 129 insertions(+), 138 deletions(-) > > > > I'm leaning towards rejecting to add this to the JSON helpers. Maybe we > > need a new file for qemu specific helper functions to share accross > > modules. > > > > Understood - the problem I keep running up against is "how much" to > "pull in". Creating some "shared" code library wasn't considered yet, > but I can certainly give that a shot (munging with Makefile's is not > something I particularly look forward to). It was certainly the easy way > out to add code to src/util. src/util/virqemu.(ch) ? It just doesn't belong to util/virjson.h in any way.
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list