All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: include a XLU_Config in _libxlDriverConfig
@ 2015-04-28  6:40 Olaf Hering
  2015-05-05  7:54 ` Wei Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Olaf Hering @ 2015-04-28  6:40 UTC (permalink / raw)
  To: xen-devel, libvir-list; +Cc: Olaf Hering, Jim Fehlig

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@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
---
 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
 
 # include "internal.h"
 # include "libvirt_internal.h"
@@ -91,6 +97,7 @@ struct _libxlDriverConfig {
     /* log stream for driver-wide libxl ctx */
     FILE *logger_file;
     xentoollog_logger *logger;
+    XLU_Config *xlu;
     /* libxl ctx for driver wide ops; getVersion, getNodeInfo, ... */
     libxl_ctx *ctx;

^ permalink raw reply related	[flat|nested] 12+ messages in thread
[parent not found: <1429292679-32340-1-git-send-email-olaf@aepfle.de>]
* [PATCH] libxl: include a XLU_Config in _libxlDriverConfig
@ 2015-04-17 17:44 Olaf Hering
  0 siblings, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2015-04-17 17:44 UTC (permalink / raw)
  To: xen-devel, libvir-list; +Cc: Olaf Hering, Jim Fehlig

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@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
---
 src/libxl/libxl_conf.c | 6 ++++++
 src/libxl/libxl_conf.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 8b76fc7..43712b3 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1421,6 +1421,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 59389d1..fd2459f 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -27,6 +27,7 @@
 # define LIBXL_CONF_H
 
 # include <libxl.h>
+# include <libxlutil.h>
 
 # include "internal.h"
 # include "libvirt_internal.h"
@@ -90,6 +91,7 @@ struct _libxlDriverConfig {
     /* log stream for driver-wide libxl ctx */
     FILE *logger_file;
     xentoollog_logger *logger;
+    XLU_Config *xlu;
     /* libxl ctx for driver wide ops; getVersion, getNodeInfo, ... */
     libxl_ctx *ctx;

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-05-07  8:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28  6:40 [PATCH] libxl: include a XLU_Config in _libxlDriverConfig Olaf Hering
2015-05-05  7:54 ` Wei Liu
     [not found] ` <20150505075434.GA26431@zion.uk.xensource.com>
2015-05-06  8:07   ` Olaf Hering
     [not found]   ` <20150506080759.GA10182@aepfle.de>
2015-05-06  8:58     ` Olaf Hering
     [not found]     ` <20150506085811.GA28064@aepfle.de>
2015-05-06  9:13       ` Wei Liu
2015-05-06 15:08       ` Jim Fehlig
     [not found]       ` <20150506091345.GD23664@zion.uk.xensource.com>
2015-05-06 15:12         ` Jim Fehlig
2015-05-07  8:20         ` Olaf Hering
     [not found]         ` <20150507082023.GA20349@aepfle.de>
2015-05-07  8:57           ` Wei Liu
2015-05-06 15:16 ` Jim Fehlig
     [not found] <1429292679-32340-1-git-send-email-olaf@aepfle.de>
2015-04-17 20:06 ` Jim Fehlig
  -- strict thread matches above, loose matches on Subject: below --
2015-04-17 17:44 Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.