[PATCH 07/34] doc: add documentation for 'timeout' command

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


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

diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index 56edb43..e25dda0 100644
--- a/Documentation/commands.dox
+++ b/Documentation/commands.dox
@@ -96,7 +96,7 @@ available in @a Barebox:
 @li @subpage sleep
 @li @subpage source
 @li @subpage test
- at li @subpage timeout
+ at li @subpage timeout_command
 @li @subpage true
 @li @subpage tftp_command
 @li @subpage ubiattach_command
diff --git a/commands/timeout.c b/commands/timeout.c
index 5f2ab9a..71a7716 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -93,14 +93,21 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_timeout_help[] =
-"Usage: timeout [OPTION]... <timeout>\n"
-"Wait <timeout> seconds for a timeout. Return 1 if the user intervented\n"
-"or 0 if a timeout occured\n"
-"  -a  interrupt on any key\n"
-"  -c  interrupt on ctrl-c\n"
-"  -r  interrupt on return\n"
-"  -s  silent mode\n";
+BAREBOX_CMD_HELP_START(timeout)
+BAREBOX_CMD_HELP_USAGE("timeout [OPTIONS] <timeout>\n")
+BAREBOX_CMD_HELP_SHORT("Wait <timeout> seconds for a timeout, return 1 on user intervention and 0 on timeout.\n")
+BAREBOX_CMD_HELP_OPT  ("-a",        "interrupt on any key\n")
+BAREBOX_CMD_HELP_OPT  ("-c",        "interrupt on ctrl-c\n")
+BAREBOX_CMD_HELP_OPT  ("-r",        "interrupt on return\n")
+BAREBOX_CMD_HELP_OPT  ("-s",        "silent mode\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page timeout_command
+
+\todo Add an example
+
+ */
 
 BAREBOX_CMD_START(timeout)
 	.cmd		= do_timeout,
-- 
1.7.2.3




More information about the barebox mailing list