Signed-off-by: Robert Schwebel <r.schwebel@xxxxxxxxxxxxxx> --- Documentation/commands.dox | 2 +- commands/mem.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Documentation/commands.dox b/Documentation/commands.dox index 881fc2c..c9a786d 100644 --- a/Documentation/commands.dox +++ b/Documentation/commands.dox @@ -74,7 +74,7 @@ available in @a Barebox: @li @subpage mkdir_command @li @subpage mount_command @li @subpage mtest -@li @subpage mw +@li @subpage mw_command @li @subpage mycdev @li @subpage nand_command @li @subpage nand_boot_test diff --git a/commands/mem.c b/commands/mem.c index 73bf915..dc778d3 100644 --- a/commands/mem.c +++ b/commands/mem.c @@ -289,12 +289,20 @@ static int do_mem_mw(struct command *cmdtp, int argc, char *argv[]) return errno; } -static const __maybe_unused char cmd_mw_help[] = -"Usage: mw [OPTIONS] <region> <value(s)>\n" -"Write value(s) to the specifies region.\n" -"options:\n" -" -b, -w, -l use byte, halfword, or word accesses\n" -" -d <file> write file (default /dev/mem)\n"; +BAREBOX_CMD_HELP_START(mw) +BAREBOX_CMD_HELP_USAGE("mw [OPTIONS] REGION VALUE(s)\n") +BAREBOX_CMD_HELP_SHORT("Write value(s) to the specified region.\n") +BAREBOX_CMD_HELP_OPT ("-b, -w, -l", "use byte, halfword or word accesses\n") +BAREBOX_CMD_HELP_OPT ("-d <file>", "write file (default: /dev/mem)\n") +BAREBOX_CMD_HELP_END + +/** + * @page mw_command + +\todo Add more documentation, especially an example and more info about <region> + + */ + BAREBOX_CMD_START(mw) .cmd = do_mem_mw, -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox