Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/7] Improve help messages in interactive gatttool
@ 2011-02-21 22:50 Sheldon Demario
  2011-02-21 22:50 ` [PATCH 2/7] Add Characteristics Discovery option to " Sheldon Demario
                   ` (14 more replies)
  0 siblings, 15 replies; 20+ messages in thread
From: Sheldon Demario @ 2011-02-21 22:50 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sheldon Demario

Includes the parameters info on help.
---
 attrib/interactive.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/attrib/interactive.c b/attrib/interactive.c
index edc465a..b491314 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -217,13 +217,19 @@ static void cmd_primary(int argcp, char **argvp)
 static struct {
 	const char *cmd;
 	void (*func)(int argcp, char **argvp);
+	const char *params;
 	const char *desc;
 } commands[] = {
-	{ "help",	cmd_help,	"Show this help"},
-	{ "exit",	cmd_exit,	"Exit interactive mode"},
-	{ "connect",	cmd_connect,	"Connect to a remote device"},
-	{ "disconnect",	cmd_disconnect,	"Disconnect from a remote device"},
-	{ "primary",	cmd_primary,	"Primary Service Discovery"},
+	{ "help",		cmd_help,	"",
+		"Show this help"},
+	{ "exit",		cmd_exit,	"",
+		"Exit interactive mode" },
+	{ "connect",		cmd_connect,	"[address]",
+		"Connect to a remote device" },
+	{ "disconnect",		cmd_disconnect,	"",
+		"Disconnect from a remote device" },
+	{ "primary",		cmd_primary,	"[UUID]",
+		"Primary Service Discovery" },
 	{ NULL, NULL, NULL}
 };
 
@@ -232,7 +238,8 @@ static void cmd_help(int argcp, char **argvp)
 	int i;
 
 	for (i = 0; commands[i].cmd; i++)
-		printf("%-12s\t%s\n", commands[i].cmd, commands[i].desc);
+		printf("%-15s %-25s %s\n", commands[i].cmd,
+				commands[i].params, commands[i].desc);
 }
 
 static void parse_line(char *line_read)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-02-24 13:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 22:50 [PATCH 1/7] Improve help messages in interactive gatttool Sheldon Demario
2011-02-21 22:50 ` [PATCH 2/7] Add Characteristics Discovery option to " Sheldon Demario
2011-02-21 22:50 ` [PATCH 3/7] Create helper functions to deal with handles on " Sheldon Demario
2011-02-21 22:50 ` [PATCH 4/7] Add Characteristics Descriptor Discovery option in " Sheldon Demario
2011-02-21 22:50 ` [PATCH 5/7] Add characteristics read options " Sheldon Demario
2011-02-21 22:50 ` [PATCH 6/7] Move attr_data_from_string() to utils.c Sheldon Demario
2011-02-21 22:50 ` [PATCH 7/7] Add Write Request in interactive gatttool Sheldon Demario
2011-02-22 19:11 ` [PATCH v2 1/7] Improve help messages " Sheldon Demario
2011-02-22 19:11 ` [PATCH v2 2/7] Add Characteristics Discovery option to " Sheldon Demario
2011-02-22 19:12 ` [PATCH v2 3/7] Create helper functions to deal with handles on " Sheldon Demario
2011-02-23  3:09   ` Johan Hedberg
2011-02-23 12:21     ` Anderson Lizardo
2011-02-23 13:23     ` Sheldon Demario
2011-02-23 14:20     ` [PATCH v3 " Sheldon Demario
2011-02-22 19:12 ` [PATCH v2 4/7] Add Characteristics Descriptor Discovery option in " Sheldon Demario
2011-02-22 19:12 ` [PATCH v2 5/7] Add characteristics read options " Sheldon Demario
2011-02-22 19:12 ` [PATCH v2 6/7] Move attr_data_from_string() to utils.c Sheldon Demario
2011-02-22 19:12 ` [PATCH v2 7/7] Add Write Request in interactive gatttool Sheldon Demario
2011-02-24 13:54 ` [PATCH v3 4/7] Add Characteristics Descriptor Discovery option " Sheldon Demario
2011-02-24 13:55 ` [PATCH v3 5/7] Add characteristics read options " Sheldon Demario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox