[libvirt] [PATCH 1/4] qemu: Move and rename qemuBuildObjectCommandlineFromJSON

Peter Krempa pkrempa at redhat.com
Tue May 31 13:50:16 UTC 2016


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 at redhat.com>
> >> ---
> >>  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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160531/472ec173/attachment-0001.sig>


More information about the libvir-list mailing list