From: Olaf Hering Date: Tue, 14 Dec 2010 18:48:44 +0000 (+0000) Subject: xenpaging: print DPRINTF ouput if XENPAGING_DEBUG is in environment X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8fa232693dfcc8f465383c6b137c6bb4db51f9a0;p=xen.git xenpaging: print DPRINTF ouput if XENPAGING_DEBUG is in environment No DPRINTF output is logged because the default loglevel is to low in libxc. Recognize the XENPAGING_DEBUG environment variable to change the default loglevel at runtime. Signed-off-by: Olaf Hering Signed-off-by: Ian Jackson --- diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 0e82121e29..76f0579616 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -39,12 +39,6 @@ #include "policy.h" #include "xenpaging.h" - -#if 0 -#undef DPRINTF -#define DPRINTF(...) ((void)0) -#endif - static char filename[80]; static int interrupted; static void close_handler(int sig) @@ -83,9 +77,12 @@ xenpaging_t *xenpaging_init(xc_interface **xch_r, domid_t domain_id) { xenpaging_t *paging; xc_interface *xch; + xentoollog_logger *dbg = NULL; int rc; - xch = xc_interface_open(NULL, NULL, 0); + if ( getenv("XENPAGING_DEBUG") ) + dbg = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, XTL_DEBUG, 0); + xch = xc_interface_open(dbg, NULL, 0); if ( !xch ) goto err_iface;