[PATCH 17/34] doc: add documentation for 'help' command

Robert Schwebel r.schwebel at pengutronix.de
Wed Dec 15 06:51:31 EST 2010


Signed-off-by: Robert Schwebel <r.schwebel at pengutronix.de>
---
 Documentation/commands.dox |    2 +-
 commands/help.c            |   22 +++++++++++++++-------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index cf45b14..887c58f 100644
--- a/Documentation/commands.dox
+++ b/Documentation/commands.dox
@@ -50,7 +50,7 @@ available in @a Barebox:
 @li @subpage gpio_direction_input_command
 @li @subpage gpio_direction_output_command
 @li @subpage go
- at li @subpage help
+ at li @subpage help_command
 @li @subpage host
 @li @subpage i2c_probe
 @li @subpage i2c_read
diff --git a/commands/help.c b/commands/help.c
index f8387bd..6d6e8e6 100644
--- a/commands/help.c
+++ b/commands/help.c
@@ -52,15 +52,23 @@ static int do_help(struct command * cmdtp, int argc, char *argv[])
 	}
 }
 
-static const __maybe_unused char cmd_help_help[] =
-"Show help information (for 'command')\n"
-"'help' prints online help for the monitor commands.\n\n"
-"Without arguments, it prints a short usage message for all commands.\n\n"
-"To get detailed help information for specific commands you can type\n"
-"'help' with one or more command names as arguments.\n";
-
 static const char *help_aliases[] = { "?", NULL};
 
+BAREBOX_CMD_HELP_START(help)
+BAREBOX_CMD_HELP_USAGE("help COMMAND\n")
+BAREBOX_CMD_HELP_SHORT("Show help information for 'command'.\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page help_command
+
+'help' prints online help for the barebox commands. Without arguments,
+it prints a shoft usage message for all commands. To get detailed help
+information for specific commands, you can type 'help' with one or more
+command names as arguments.
+
+ */
+
 BAREBOX_CMD_START(help)
 	.cmd		= do_help,
 	.aliases	= help_aliases,
-- 
1.7.2.3




More information about the barebox mailing list