diff --git a/ChangeLog b/ChangeLog index e0b69a39e1..da496a6465 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Oct 6 15:47:00 EST 2008 Cole Robinson + + * qemud/remote.c src/hash.c src/internal.h src/lxc_conf.c + src/lxc_container.c src/lxc_controller.c src/lxc_driver.c + src/remote_internal.c src/storage_backend_disk.c src/veth.c + src/xen_internal.c src/xen_unified.c src/xend_internal.c: + Move DEBUG and DEBUG0 macros to central location. + Mon Oct 6 15:32:00 EST 2008 Cole Robinson * src/qemu_conf.c: Fix possible segfault if starting a qemu guest with diff --git a/qemud/remote.c b/qemud/remote.c index 3e43dcfd49..8acd95dc27 100644 --- a/qemud/remote.c +++ b/qemud/remote.c @@ -52,8 +52,6 @@ #include "qemud.h" #include "memory.h" -#define DEBUG 0 - #define REMOTE_DEBUG(fmt,...) qemudDebug("REMOTE: " fmt, __VA_ARGS__) static void remoteDispatchError (struct qemud_client *client, @@ -427,10 +425,6 @@ remoteDispatchOpen (struct qemud_server *server ATTRIBUTE_UNUSED, name = args->name ? *args->name : NULL; -#if DEBUG - fprintf (stderr, "remoteDispatchOpen: name = %s\n", name); -#endif - /* If this connection arrived on a readonly socket, force * the connection to be readonly. */ diff --git a/src/hash.c b/src/hash.c index 01def44d91..d4b8a746a4 100644 --- a/src/hash.c +++ b/src/hash.c @@ -29,9 +29,6 @@ #define MAX_HASH_LEN 8 -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - /* #define DEBUG_GROW */ /* diff --git a/src/internal.h b/src/internal.h index d96504d5b9..a3d48faa1f 100644 --- a/src/internal.h +++ b/src/internal.h @@ -85,6 +85,9 @@ extern int debugFlag; do { } while (0) #endif /* !ENABLE_DEBUG */ +#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) +#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) + /* C99 uses __func__. __FUNCTION__ is legacy. */ #ifndef __GNUC__ #define __FUNCTION__ __func__ diff --git a/src/libvirt.c b/src/libvirt.c index ed98323a88..e06e9f311a 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -76,9 +76,6 @@ static int virStateDriverTabCount = 0; #endif static int initialized = 0; -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - #ifdef ENABLE_DEBUG int debugFlag = 0; #endif diff --git a/src/lxc_conf.c b/src/lxc_conf.c index 4228b866d4..bea6bbe273 100644 --- a/src/lxc_conf.c +++ b/src/lxc_conf.c @@ -29,10 +29,6 @@ #include "lxc_conf.h" -/* debug macros */ -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - /* Functions */ void lxcError(virConnectPtr conn, virDomainPtr dom, int code, const char *fmt, ...) diff --git a/src/lxc_container.c b/src/lxc_container.c index f3ec1663a3..7599b75e41 100644 --- a/src/lxc_container.c +++ b/src/lxc_container.c @@ -46,9 +46,6 @@ #include "memory.h" #include "veth.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - /* * GLibc headers are behind the kernel, so we define these * constants if they're not present already. diff --git a/src/lxc_controller.c b/src/lxc_controller.c index 908ddf1ace..4721c80818 100644 --- a/src/lxc_controller.c +++ b/src/lxc_controller.c @@ -44,9 +44,6 @@ #include "util.h" #include "cgroup.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - int debugFlag = 0; struct cgroup_device_policy { diff --git a/src/lxc_driver.c b/src/lxc_driver.c index e3e40abdb7..64c3d21941 100644 --- a/src/lxc_driver.c +++ b/src/lxc_driver.c @@ -46,11 +46,6 @@ #include "cgroup.h" -/* debug macros */ -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - - static int lxcStartup(void); static int lxcShutdown(void); static lxc_driver_t *lxc_driver = NULL; diff --git a/src/remote_internal.c b/src/remote_internal.c index da1ced62cb..06b0f4f374 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -74,9 +74,6 @@ #include "memory.h" #include "util.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt,__VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - /* Per-connection private data. */ #define MAGIC 999 /* private_data->magic if OK */ #define DEAD 998 /* private_data->magic if dead/closed */ diff --git a/src/storage_backend_disk.c b/src/storage_backend_disk.c index ea6d720ac4..e9c9446291 100644 --- a/src/storage_backend_disk.c +++ b/src/storage_backend_disk.c @@ -30,9 +30,6 @@ #include "util.h" #include "memory.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - enum { VIR_STORAGE_POOL_DISK_DOS = 0, VIR_STORAGE_POOL_DISK_DVH, diff --git a/src/veth.c b/src/veth.c index 7cfee56373..e2dcb9545e 100644 --- a/src/veth.c +++ b/src/veth.c @@ -18,9 +18,6 @@ #include "memory.h" #include "util.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - /* Functions */ /** * getFreeVethName: diff --git a/src/xen_internal.c b/src/xen_internal.c index 3cfc5e3cfb..c3aaa605e5 100644 --- a/src/xen_internal.c +++ b/src/xen_internal.c @@ -48,9 +48,6 @@ #include "capabilities.h" #include "memory.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt, __VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - /* * so far there is 2 versions of the structures usable for doing * hypervisor calls. diff --git a/src/xen_unified.c b/src/xen_unified.c index 58073915ba..dae68d38e3 100644 --- a/src/xen_unified.c +++ b/src/xen_unified.c @@ -40,9 +40,6 @@ #include "util.h" #include "memory.h" -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt,__VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - static int xenUnifiedNodeGetInfo (virConnectPtr conn, virNodeInfoPtr info); static int diff --git a/src/xend_internal.c b/src/xend_internal.c index d6dcd3eaa3..0125913472 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -46,9 +46,6 @@ /* required for cpumap_t */ #include -#define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt,__VA_ARGS__) -#define DEBUG0(msg) VIR_DEBUG(__FILE__, "%s", msg) - #ifndef PROXY /*