From 877dbcdb0bf125696c0753158906ab71d53b9e3f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 29 Dec 2013 21:59:29 -0800 Subject: [PATCH] monitor: Clearly mark supported command bits that are unknown --- monitor/packet.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/monitor/packet.c b/monitor/packet.c index 473ab8d66..69383ced8 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -69,6 +69,7 @@ #define COLOR_UNKNOWN_ERROR COLOR_WHITE_BG #define COLOR_UNKNOWN_FEATURE_BIT COLOR_WHITE_BG +#define COLOR_UNKNOWN_COMMAND_BIT COLOR_WHITE_BG #define COLOR_UNKNOWN_EVENT_MASK COLOR_WHITE_BG #define COLOR_UNKNOWN_LE_STATES COLOR_WHITE_BG #define COLOR_UNKNOWN_SERVICE_CLASS COLOR_WHITE_BG @@ -2083,7 +2084,12 @@ static void print_commands(const uint8_t *commands) continue; cmd = get_supported_command((i * 8) + n); - print_field(" %s (Octet %d - Bit %d)", cmd, i, n); + if (cmd) + print_field(" %s (Octet %d - Bit %d)", + cmd, i, n); + else + print_text(COLOR_UNKNOWN_COMMAND_BIT, + " Octet %d - Bit %d ", i, n); } } } -- 2.47.3