[PATCH BlueZ v2 08/13] gatttool: Show connection state using color

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When device is connected, the Bluetooth address is shown in blue color.
---
 attrib/interactive.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/attrib/interactive.c b/attrib/interactive.c
index ecb8b7d..5ffe2fb 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -79,15 +79,15 @@ static char *get_prompt(void)
 	}
 
 	if (conn_state == STATE_CONNECTED)
-		g_string_assign(prompt, "[CON]");
-	else
-		g_string_assign(prompt, "[   ]");
+		g_string_append(prompt, COLOR_BLUE);
 
 	if (opt_dst)
 		g_string_append_printf(prompt, "[%17s]", opt_dst);
 	else
 		g_string_append_printf(prompt, "[%17s]", "");
 
+	g_string_append(prompt, COLOR_OFF);
+
 	if (opt_psm)
 		g_string_append(prompt, "[BR]");
 	else
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux