summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-12-10 11:19:18 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2010-12-17 21:28:40 +0100
commitc87874130fbb49b93ef92573affac912d2beaf15 (patch)
treea80cc4c1410eb750b7b9bcc1ff6b50bd46f16195
parent70c78d69ebe04252234f9a370c4b232f214a1a77 (diff)
downloadbarebox-c87874130fbb49b93ef92573affac912d2beaf15.tar.gz
barebox-c87874130fbb49b93ef92573affac912d2beaf15.tar.xz
doc: add documentation for 'timeout' command
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-rw-r--r--Documentation/commands.dox2
-rw-r--r--commands/timeout.c23
2 files changed, 16 insertions, 9 deletions
diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index 56edb433..e25dda00 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
-@li @subpage timeout
+@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 5f2ab9a2..71a77162 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,