mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 33/34] doc: add documentation for 'memcmp' command
Date: Wed, 15 Dec 2010 12:51:47 +0100	[thread overview]
Message-ID: <1292413908-464-34-git-send-email-r.schwebel@pengutronix.de> (raw)
In-Reply-To: <1292413908-464-1-git-send-email-r.schwebel@pengutronix.de>

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 Documentation/commands.dox |    2 +-
 commands/mem.c             |   33 +++++++++++++++++++--------------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/Documentation/commands.dox b/Documentation/commands.dox
index c9a786d..7f5c4f7 100644
--- a/Documentation/commands.dox
+++ b/Documentation/commands.dox
@@ -67,7 +67,7 @@ available in @a Barebox:
 @li @subpage ls_command
 @li @subpage lsmod_command
 @li @subpage md
-@li @subpage memcmp
+@li @subpage memcmp_command
 @li @subpage meminfo_command
 @li @subpage memset
 @li @subpage menu
diff --git a/commands/mem.c b/commands/mem.c
index dc778d3..f9f71a7 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -310,7 +310,7 @@ BAREBOX_CMD_START(mw)
 	BAREBOX_CMD_HELP(cmd_mw_help)
 BAREBOX_CMD_END
 
-static int do_mem_cmp(struct command *cmdtp, int argc, char *argv[])
+static int do_memcmp(struct command *cmdtp, int argc, char *argv[])
 {
 	ulong	addr1, addr2, count = ~0;
 	int	mode  = O_RWSIZE_1;
@@ -400,21 +400,26 @@ out:
 	return ret;
 }
 
-static const __maybe_unused char cmd_memcmp_help[] =
-"Usage: memcmp [OPTIONS] <addr1> <addr2> <count>\n"
-"\n"
-"options:\n"
-"  -b, -w, -l	use byte, halfword, or word accesses\n"
-"  -s <file>    source file (default /dev/mem)\n"
-"  -d <file>    destination file (default /dev/mem)\n"
-"\n"
-"Compare memory regions specified with addr1 and addr2\n"
-"of size <count> bytes. If source is a file count can\n"
-"be left unspecified in which case the whole file is\n"
-"compared\n";
+BAREBOX_CMD_HELP_START(memcmp)
+BAREBOX_CMD_HELP_USAGE("memcmp [OPTIONS] ADDR1 ADDR2 COUNT\n")
+BAREBOX_CMD_HELP_SHORT("Compare memory regions ADDR1 and ADDR2 of COUNT bytes.\n")
+BAREBOX_CMD_HELP_OPT  ("-b, -w, -l", "use byte, halfword or word accesses\n")
+BAREBOX_CMD_HELP_OPT  ("-s <file>", "source file (default: /dev/mem)\n")
+BAREBOX_CMD_HELP_OPT  ("-d <file>", "destination file (default: /dev/mem)\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page memcmp_command
+
+<p> If source is a file, count can be left unspecified. In this case the
+whole file is compared.</p>
+
+\todo Add example.
+
+ */
 
 BAREBOX_CMD_START(memcmp)
-	.cmd		= do_mem_cmp,
+	.cmd		= do_memcmp,
 	.usage		= "memory compare",
 	BAREBOX_CMD_HELP(cmd_memcmp_help)
 BAREBOX_CMD_END
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-12-15 11:51 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 11:51 More Documentation Patches Robert Schwebel
2010-12-15 11:51 ` [PATCH 01/34] doc: remove non-existing references Robert Schwebel
2010-12-15 11:51 ` [PATCH 02/34] doc: add documentation for 'version' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 03/34] doc: add documentation for 'unlzo' command Robert Schwebel
2010-12-15 19:16   ` Sascha Hauer
2010-12-15 11:51 ` [PATCH 04/34] doc: add documentation for 'umount' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 05/34] doc: add documentation for 'usb' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 06/34] doc: add documentation for ubi commands Robert Schwebel
2010-12-15 11:51 ` [PATCH 07/34] doc: add documentation for 'timeout' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 08/34] doc: add documentation for 'true' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 09/34] doc: add documentation for 'sleep' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 10/34] doc: add documentation for 'rm' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 11/34] doc: add documentation for 'rmdir' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 12/34] doc: add documentation for 'mkdir' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 13/34] doc: add documentation for 'test' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 14/34] doc: add documentation for 'lsmod' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 15/34] doc: add documentation for 'readline' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 16/34] doc: add documentation for 'insmod' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 17/34] doc: add documentation for 'help' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 18/34] doc: add documentation for 'pwd' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 19/34] doc: add documentation for 'false' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 20/34] doc: add documentation for 'exec' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 21/34] doc: add documentation for 'reset' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 22/34] doc: add documentation for 'reginfo' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 23/34] doc: add documentation for 'meminfo' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 24/34] doc: add documentation for 'go' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 25/34] doc: add documentation for 'source' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 26/34] doc: add documentation for 'sh' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 27/34] doc: add documentation for 'ping' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 28/34] doc: add documentation for 'nfs' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 29/34] doc: add documentation for 'rarpboot' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 30/34] doc: add documentation for 'passwd' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 31/34] doc: add documentation for 'nand' command Robert Schwebel
2010-12-15 11:51 ` [PATCH 32/34] doc: add documentation for 'mw' command Robert Schwebel
2010-12-15 11:51 ` Robert Schwebel [this message]
2010-12-15 11:51 ` [PATCH 34/34] doc: add documentation for 'md' command Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292413908-464-34-git-send-email-r.schwebel@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox