summaryrefslogtreecommitdiffstats
path: root/commands/partition.c
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-10-18 21:02:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-11-01 16:23:08 +0100
commit2a2d59f174615ba6d08e88ffa68b516f83810d9b (patch)
treee1b437be893005b624cb79e78ea7592171d5a25e /commands/partition.c
parent5a1286d69662ef4501ee01dad723d5673d3ab69c (diff)
downloadbarebox-2a2d59f174615ba6d08e88ffa68b516f83810d9b.tar.gz
barebox-2a2d59f174615ba6d08e88ffa68b516f83810d9b.tar.xz
doc: unify documentation for 'addpart'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'commands/partition.c')
-rw-r--r--commands/partition.c50
1 files changed, 17 insertions, 33 deletions
diff --git a/commands/partition.c b/commands/partition.c
index a1edcf67e0..dd37bc265f 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -149,19 +149,23 @@ static int do_addpart(struct command * cmdtp, int argc, char *argv[])
return 0;
}
-static const __maybe_unused char cmd_addpart_help[] =
-"Usage: addpart <device> <partition description>\n"
-"\n"
-"addpart adds a partition description to a device. The partition description\n"
-"has the form\n"
-"size1[@offset1](name1)[ro],size2[@offset2](name2)[ro],...\n"
-"<device> is the device name under. Size and offset can be given in decimal\n"
-"or - if prefixed with 0x in hex. Both can have an optional suffix K,M,G.\n"
-"The size of the last partition can be specified as '-' for the remaining\n"
-"space of the device.\n"
-"This format is the same as used in the Linux kernel for cmdline mtd partitions.\n"
-"\n"
-"Note: That this command has to be reworked and will probably change it's API.";
+BAREBOX_CMD_HELP_START(addpart)
+BAREBOX_CMD_HELP_USAGE("addpart <device> <part_desc>\n")
+BAREBOX_CMD_HELP_SHORT("Add a partition description to a device.\n")
+BAREBOX_CMD_HELP_OPT ("<device>", "device being worked on\n")
+BAREBOX_CMD_HELP_OPT ("<part_desc>", "size1[@offset1](name1)[ro],size2[@offset2](name2)[ro],...\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page addpart_command
+Size and offset can be given in decimal hex (prefixed with 0x). Both
+can have an optional suffix K, M or G. The size of the last partition
+can be specified as '-' for the remaining space on the device. This
+format is the same as used by the Linux kernel or cmdline mtd
+partitions.
+
+\todo This command has to be reworked and will probably change it's API.
+*/
BAREBOX_CMD_START(addpart)
.cmd = do_addpart,
@@ -169,26 +173,6 @@ BAREBOX_CMD_START(addpart)
BAREBOX_CMD_HELP(cmd_addpart_help)
BAREBOX_CMD_END
-/** @page addpart_command addpart Add a partition to a device
- *
- * Usage is: addpart \<device> \<partition description>
- *
- * Adds a partition description to a device. The partition description has the
- * form
- *
- * size1[\@offset1](name1)[ro],size2[\@offset2](name2)[ro],...
- *
- * \<device> is the device name under. Size and offset can be given in decimal
- * or - if prefixed with 0x - in hex. Both can have an optional suffix K,M,G.
- * The size of the last partition can be specified as '-' for the remaining
- * space of the device.
- *
- * @note The format is the same as used in the Linux kernel for cmdline mtd
- * partitions.
- *
- * @note This command has to be reworked and will probably change it's API.
- */
-
static int do_delpart(struct command * cmdtp, int argc, char *argv[])
{
int i, err;