linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH 2/3] Btrfs-progs, btrfs-corrupt-block: fix the wrong usage
Date: Thu, 23 Feb 2012 15:52:05 +0800	[thread overview]
Message-ID: <4F45F025.1020204@cn.fujitsu.com> (raw)

The old usage is a copy of btrfs-map-logical, it's wrong, fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
This patch is against dangerdonteveruse branch.
---
 btrfs-corrupt-block.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index 9ad3e05..df84c81 100644
--- a/btrfs-corrupt-block.c
+++ b/btrfs-corrupt-block.c
@@ -85,11 +85,13 @@ struct extent_buffer *debug_corrupt_block(struct btrfs_root *root, u64 bytenr,
 
 static void print_usage(void)
 {
-	fprintf(stderr, "usage: btrfs-map-logical [options] mount_point\n");
-	fprintf(stderr, "\t-l Logical extent to map\n");
-	fprintf(stderr, "\t-c Copy of the extent to read (usually 1 or 2)\n");
-	fprintf(stderr, "\t-o Output file to hold the extent\n");
-	fprintf(stderr, "\t-b Number of bytes to read\n");
+	fprintf(stderr, "usage: btrfs-corrupt-block [options] device\n");
+	fprintf(stderr, "\t-l Logical extent to be corrupted\n");
+	fprintf(stderr, "\t-c Copy of the extent to be corrupted"
+		" (usually 1 or 2, default: 0)\n");
+	fprintf(stderr, "\t-b Number of bytes to be corrupted\n");
+	fprintf(stderr, "\t-e Extent to be corrupted\n");
+	fprintf(stderr, "\t-E The whole extent free to be corrupted\n");
 	exit(1);
 }
 
@@ -244,7 +246,7 @@ int main(int ac, char **av)
 
 	while(1) {
 		int c;
-		c = getopt_long(ac, av, "l:c:eE", long_options,
+		c = getopt_long(ac, av, "l:c:b:eE", long_options,
 				&option_index);
 		if (c < 0)
 			break;
-- 
1.7.6.5

                 reply	other threads:[~2012-02-23  7:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4F45F025.1020204@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).