[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH v3 04/10] lib/osinfo.c: Extract xml processing into a callback

On Tue, Feb 14, 2017 at 05:19:27PM +0100, Cedric Bosdonnat wrote:
> I could add them to the commit using the osinfo from mllib if you want.
> Otherwise the functions are missing when linking the mllib ocaml / C wrapper.

That would make this commit simpler.

There could be a bigger problem though -- in theory the debug(),
error() etc macros should only be used from library code.  Your new
osinfo code is now being used as common code.  Now there are a few
ways to resolve this:

(1) Move debug(), error() etc to common/utils.  I'm not sure this will
actually work since they depend on g->verbose which is a private field
in the handle.

(2) Remove use of debug(), error() etc from the new mini-library.
Problem goes away completely if you can do this.

(3) Move the mini-library under common/osinfo (cf. common/visit for a
similar example).  Dependencies may make this difficult, but may also
point to problems.

Possibly (2) & (3) ...


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]