[PATCH 06/34] doc: add documentation for ubi commands

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


Signed-off-by: Robert Schwebel <r.schwebel at pengutronix.de>
---
 Documentation/commands.dox |    6 +++---
 commands/ubi.c             |   39 +++++++++++++++++++++++++++++----------
 2 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index d5536d3..56edb43 100644
--- a/Documentation/commands.dox
+++ b/Documentation/commands.dox
@@ -99,9 +99,9 @@ available in @a Barebox:
 @li @subpage timeout
 @li @subpage true
 @li @subpage tftp_command
- at li @subpage ubiattach
- at li @subpage ubimkvol
- at li @subpage ubirmvol
+ at li @subpage ubiattach_command
+ at li @subpage ubimkvol_command
+ at li @subpage ubirmvol_command
 @li @subpage umount_command
 @li @subpage unlzo_command
 @li @subpage unprotect_command
diff --git a/commands/ubi.c b/commands/ubi.c
index 3da0835..d896385 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -44,10 +44,17 @@ static int do_ubimkvol(struct command *cmdtp, int argc, char *argv[])
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_ubimkvol_help[] =
-"Usage: ubimkvol <ubidev> <name> <size>\n"
-"Create an ubi volume on <ubidev> with name <name> and size <size>\n"
-"If size os zero all available space is used for the volume\n";
+BAREBOX_CMD_HELP_START(ubimkvol)
+BAREBOX_CMD_HELP_USAGE("ubimkvol <ubidev> <name> <size>\n")
+BAREBOX_CMD_HELP_SHORT("Create an ubi volume on <ubidev> with <name> and <size>.\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page ubimkvol_command
+
+If size is zero, all available space is used for the volume.
+
+ */
 
 BAREBOX_CMD_START(ubimkvol)
 	.cmd		= do_ubimkvol,
@@ -82,9 +89,15 @@ static int do_ubiattach(struct command *cmdtp, int argc, char *argv[])
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_ubiattach_help[] =
-"Usage: ubiattach <mtddev>\n"
-"Attach <mtddev> to ubi\n";
+BAREBOX_CMD_HELP_START(ubiattach)
+BAREBOX_CMD_HELP_USAGE("ubiattach <mtddev>\n")
+BAREBOX_CMD_HELP_SHORT("Attach <mtddev> to ubi.\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page ubiattach_command
+
+ */
 
 BAREBOX_CMD_START(ubiattach)
 	.cmd		= do_ubiattach,
@@ -117,9 +130,15 @@ static int do_ubirmvol(struct command *cmdtp, int argc, char *argv[])
 	return ret ? 1 : 0;
 }
 
-static const __maybe_unused char cmd_ubirmvol_help[] =
-"Usage: ubirmvol <ubidev> <name>\n"
-"Delete ubi volume <name> from <ubidev>\n";
+BAREBOX_CMD_HELP_START(ubirmvol)
+BAREBOX_CMD_HELP_USAGE("ubirmvol <ubidev> <name>\n")
+BAREBOX_CMD_HELP_SHORT("Delete ubi volume <name> from <ubidev>.\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page ubirmvol_command
+
+ */
 
 BAREBOX_CMD_START(ubirmvol)
 	.cmd		= do_ubirmvol,
-- 
1.7.2.3




More information about the barebox mailing list