[libvirt] [PATCH] qemu: Enable disabled debug messages

--- src/qemu/qemu_conf.c | 2 +- src/qemu/qemu_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d81e6cc..08c084b 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1449,7 +1449,7 @@ int qemudParseHelpStr(const char *qemu, *flags = qemudComputeCmdFlags(help, *version, *is_kvm, *kvm_version); - qemudDebug("Version %u.%u.%u, cooked version %u, flags %u", + qemudDebug("Version %u.%u.%u, cooked version %u, flags 0x%llx", major, minor, micro, *version, *flags); if (*kvm_version) qemudDebug("KVM version %d detected", *kvm_version); diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index a1556cb..50938f5 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -44,7 +44,7 @@ # include "macvtap.h" # include "command.h" -# define qemudDebug(fmt, ...) do {} while(0) +# define qemudDebug DEBUG # define QEMUD_CPUMASK_LEN CPU_SETSIZE -- 1.7.3.2

On Tue, Dec 07, 2010 at 06:24:45PM +0100, Jiri Denemark wrote:
--- src/qemu/qemu_conf.c | 2 +- src/qemu/qemu_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d81e6cc..08c084b 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1449,7 +1449,7 @@ int qemudParseHelpStr(const char *qemu,
*flags = qemudComputeCmdFlags(help, *version, *is_kvm, *kvm_version);
- qemudDebug("Version %u.%u.%u, cooked version %u, flags %u", + qemudDebug("Version %u.%u.%u, cooked version %u, flags 0x%llx", major, minor, micro, *version, *flags); if (*kvm_version) qemudDebug("KVM version %d detected", *kvm_version); diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index a1556cb..50938f5 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -44,7 +44,7 @@ # include "macvtap.h" # include "command.h"
-# define qemudDebug(fmt, ...) do {} while(0) +# define qemudDebug DEBUG
# define QEMUD_CPUMASK_LEN CPU_SETSIZE
It'd be preferrable to kill qemudDebug and just use VIR_DEBUG directly I'm already doing this in the daemon/ code I'm currently re-writing. There's just a few instances left in src/qemu/ Daniel

On 12/07/2010 10:24 AM, Jiri Denemark wrote:
--- src/qemu/qemu_conf.c | 2 +- src/qemu/qemu_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d81e6cc..08c084b 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1449,7 +1449,7 @@ int qemudParseHelpStr(const char *qemu,
*flags = qemudComputeCmdFlags(help, *version, *is_kvm, *kvm_version);
- qemudDebug("Version %u.%u.%u, cooked version %u, flags %u", + qemudDebug("Version %u.%u.%u, cooked version %u, flags 0x%llx", major, minor, micro, *version, *flags); if (*kvm_version) qemudDebug("KVM version %d detected", *kvm_version); diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index a1556cb..50938f5 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -44,7 +44,7 @@ # include "macvtap.h" # include "command.h"
-# define qemudDebug(fmt, ...) do {} while(0) +# define qemudDebug DEBUG
ACK. Hmm; should we rename the use of qemudDebug in daemon/libvirtd.c to something more appropriate, as a follow-on cleanup? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 12/07/2010 10:40 AM, Eric Blake wrote:
+++ b/src/qemu/qemu_conf.h @@ -44,7 +44,7 @@ # include "macvtap.h" # include "command.h"
-# define qemudDebug(fmt, ...) do {} while(0) +# define qemudDebug DEBUG
ACK. Hmm; should we rename the use of qemudDebug in daemon/libvirtd.c to something more appropriate, as a follow-on cleanup?
On the other hand, I agree with danpb's NACK to just rewrite the few remaining uses directly into VIR_DEBUG, rather than keeping the name qemudDebug around. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- src/qemu/qemu_conf.c | 8 ++++---- src/qemu/qemu_conf.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d81e6cc..e5d0206 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1449,12 +1449,12 @@ int qemudParseHelpStr(const char *qemu, *flags = qemudComputeCmdFlags(help, *version, *is_kvm, *kvm_version); - qemudDebug("Version %u.%u.%u, cooked version %u, flags %u", - major, minor, micro, *version, *flags); + VIR_DEBUG("Version %u.%u.%u, cooked version %u, flags 0x%llx", + major, minor, micro, *version, *flags); if (*kvm_version) - qemudDebug("KVM version %d detected", *kvm_version); + VIR_DEBUG("KVM version %d detected", *kvm_version); else if (*is_kvm) - qemudDebug("qemu-kvm version %u.%u.%u detected", major, minor, micro); + VIR_DEBUG("qemu-kvm version %u.%u.%u detected", major, minor, micro); return 0; diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index a1556cb..71318bf 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -44,8 +44,6 @@ # include "macvtap.h" # include "command.h" -# define qemudDebug(fmt, ...) do {} while(0) - # define QEMUD_CPUMASK_LEN CPU_SETSIZE /* Internal flags to keep track of qemu command line capabilities */ -- 1.7.3.2

On 12/07/2010 12:41 PM, Jiri Denemark wrote:
--- src/qemu/qemu_conf.c | 8 ++++---- src/qemu/qemu_conf.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d81e6cc..e5d0206 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1449,12 +1449,12 @@ int qemudParseHelpStr(const char *qemu,
*flags = qemudComputeCmdFlags(help, *version, *is_kvm, *kvm_version);
- qemudDebug("Version %u.%u.%u, cooked version %u, flags %u", - major, minor, micro, *version, *flags); + VIR_DEBUG("Version %u.%u.%u, cooked version %u, flags 0x%llx", + major, minor, micro, *version, *flags);
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

src/qemu/qemu_conf.c | 8 ++++---- src/qemu/qemu_conf.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d81e6cc..e5d0206 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1449,12 +1449,12 @@ int qemudParseHelpStr(const char *qemu,
*flags = qemudComputeCmdFlags(help, *version, *is_kvm, *kvm_version);
- qemudDebug("Version %u.%u.%u, cooked version %u, flags %u", - major, minor, micro, *version, *flags); + VIR_DEBUG("Version %u.%u.%u, cooked version %u, flags 0x%llx", + major, minor, micro, *version, *flags);
ACK.
Thanks, pushed. Jirka
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Jiri Denemark