Only print unknown command message in debug mode
PATCH 1/1 Only print unknown command message in debug mode
After using QEMU with the sb16 sound card I would see all these messages about some numbered command not being understood. It became annoying after a while to always see this message, so this patch changes things so that the message is only printed when DEBUG is defined.
--- hw/audio/sb16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/audio/sb16.c +1 -1
@@ -632,7 +632,7 @@ static void command (SB16State *s, uint8_t cmd)return ; warn: -dolog ("warning: command %#x,%d is not truly understood yet\n" , +ldebug ("warning: command %#x,%d is not truly understood yet\n" , cmd, s->needed_bytes); goto exit;
Signature · 1 line
2.14.3 (Apple Git-98)
Hi John,
Quoted 12 lines · John Arbuckle
After using QEMU with the sb16 sound card I would see all these messages about some numbered command not being understood. It became annoying after a while to always see this message, so this patch changes things so that the message is only printed when DEBUG is defined.
Signed-off-by John Arbuckle <[email protected]>--- hw/audio/sb16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/audio/sb16.c +0
-0
hw/audio/sb16.c static void command (SB16State *s, uint8_t cmd) · line 636
Quoted 6 lines
hw/audio/sb16.c +1
-1@@ -632,7 +632,7 @@ static void command (SB16State *s, uint8_t cmd)return ; warn: -dolog ("warning: command %#x,%d is not truly understood yet\n" , +ldebug ("warning: command %#x,%d is not truly understood yet\n" , cmd, s->needed_bytes);
While changing this file can you use the latest logging API? such:
qemu_log_mask(LOG_UNIMP, "unimplemented command 0x%02x (size:%d)",
cmd, s->needed_bytes);So one can enable this log level at runtime (with "-d unimp"), the #define DEBUG is compile time (require a rebuild).
Quoted 3 lines
hw/audio/sb16.c +0
-0goto exit;
Quoted 27 lines · Philippe Mathieu-Daudé
Hi John,
Quoted 12 lines · John Arbuckle
After using QEMU with the sb16 sound card I would see all these messages about some numbered command not being understood. It became annoying after a while to always see this message, so this patch changes things so that the message is only printed when DEBUG is defined.
Signed-off-by John Arbuckle <[email protected]>---
hw/audio/sb16.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)hw/audio/sb16.c +0
-0hw/audio/sb16.c static void command (SB16State *s, uint8_t cmd) · line 636
Quoted 6 lines
hw/audio/sb16.c +1
-1@@ -632,7 +632,7 @@ static void command (SB16State *s, uint8_t cmd)return ; warn: -dolog ("warning: command %#x,%d is not truly understood yet\n" , +ldebug ("warning: command %#x,%d is not truly understood yet\n" , cmd, s->needed_bytes);While changing this file can you use the latest logging API? such:
Quoted 7 lines
qemu_log_mask(LOG_UNIMP, "unimplemented command 0x%02x (size:%d)", cmd, s->needed_bytes);So one can enable this log level at runtime (with "-d unimp"), the #define DEBUG is compile time (require a rebuild).
Quoted 1 line
hw/audio/sb16.c +0
-0goto exit;
Absolutely. This is a good idea.