Olaf Hering wrote: > Upcoming changes for vscsi will use libxlutil.so to prepare the > configuration for libxl. The helpers needs a xlu struct for logging. > Provide one and reuse the existing output as log target. > > Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> > Cc: Jim Fehlig <jfehlig@xxxxxxxx> > --- > src/libxl/libxl_conf.c | 6 ++++++ > src/libxl/libxl_conf.h | 7 +++++++ > 2 files changed, 13 insertions(+) > > diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c > index 53f327b..f9bb5ed 100644 > --- a/src/libxl/libxl_conf.c > +++ b/src/libxl/libxl_conf.c > @@ -1454,6 +1454,12 @@ libxlDriverConfigNew(void) > goto error; > } > > + cfg->xlu = xlu_cfg_init(cfg->logger_file, "libvirt"); > + if (!cfg->xlu) { > + VIR_ERROR(_("cannot create xlu for libxenlight, disabling driver")); > + goto error; > + } > + > if (libxl_ctx_alloc(&cfg->ctx, LIBXL_VERSION, 0, cfg->logger)) { > VIR_ERROR(_("cannot initialize libxenlight context, probably not " > "running in a Xen Dom0, disabling driver")); > diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h > index 5ba1a71..bdc68d4 100644 > --- a/src/libxl/libxl_conf.h > +++ b/src/libxl/libxl_conf.h > @@ -27,6 +27,12 @@ > # define LIBXL_CONF_H > > # include <libxl.h> > +#ifdef HAVE_LIBXLUTIL_H > +# include <libxlutil.h> > +#else > +typedef struct XLU_Config XLU_Config; > +XLU_Config *xlu_cfg_init(FILE *report, const char *report_filename); > +#endif > In addition to the cleanup mentioned by Wei, you'll need to fix the indentation of these preprocessor directives. 'make syntax-check' would have caught that if you had cppi installed. Regards, Jim -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list