[PATCH 31/34] doc: add documentation for 'nand' command
Robert Schwebel
r.schwebel at pengutronix.de
Wed Dec 15 06:51:45 EST 2010
Signed-off-by: Robert Schwebel <r.schwebel at pengutronix.de>
---
Documentation/commands.dox | 2 +-
commands/nand.c | 22 +++++++++++++++-------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index 44a72da..881fc2c 100644
--- a/Documentation/commands.dox
+++ b/Documentation/commands.dox
@@ -76,7 +76,7 @@ available in @a Barebox:
@li @subpage mtest
@li @subpage mw
@li @subpage mycdev
- at li @subpage nand
+ at li @subpage nand_command
@li @subpage nand_boot_test
@li @subpage nfs_command
@li @subpage passwd_command
diff --git a/commands/nand.c b/commands/nand.c
index 0902f21..18c6bd3 100644
--- a/commands/nand.c
+++ b/commands/nand.c
@@ -354,15 +354,23 @@ static int do_nand(struct command *cmdtp, int argc, char *argv[])
return 0;
}
-static const __maybe_unused char cmd_nand_help[] =
-"Usage: nand [OPTION]...\n"
-"nand related commands\n"
-" -a <dev> register a bad block aware device ontop of a normal nand device\n"
-" -d <dev> deregister a bad block aware device\n"
-" -b <ofs> <dev> mark block at offset ofs as bad\n";
+BAREBOX_CMD_HELP_START(nand)
+BAREBOX_CMD_HELP_USAGE("nand [OPTIONS]\n")
+BAREBOX_CMD_HELP_SHORT("NAND related commands.\n")
+BAREBOX_CMD_HELP_OPT ("-a <dev>", "register a bad block aware device ontop of a normal nand device\n")
+BAREBOX_CMD_HELP_OPT ("-d <dev>", "deregister a bad block aware device\n")
+BAREBOX_CMD_HELP_OPT ("-b <ofs> <dev>", "mark block at offset ofs as bad\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page nand_command
+
+\todo This does definitely need more documentation.
+
+ */
BAREBOX_CMD_START(nand)
.cmd = do_nand,
- .usage = "NAND specific handling",
+ .usage = "NAND related commands",
BAREBOX_CMD_HELP(cmd_nand_help)
BAREBOX_CMD_END
--
1.7.2.3
More information about the barebox
mailing list