summaryrefslogtreecommitdiff
path: root/btrfs-corrupt-block.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-02-23 15:52:05 +0800
committerChris Mason <chris.mason@fusionio.com>2012-07-03 16:27:46 -0400
commit596979bee13196d8d6ed3a46e3962912846ef238 (patch)
treee28303636a8522d60018bded57bc5e9f4e300acc /btrfs-corrupt-block.c
parent24c2ac5eb1135c2f8e98944fa021e51049331688 (diff)
Btrfs-progs, btrfs-corrupt-block: fix the wrong usage
The old usage is a copy of btrfs-map-logical, it's wrong, fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Diffstat (limited to 'btrfs-corrupt-block.c')
-rw-r--r--btrfs-corrupt-block.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index 7051e99c..b57e7573 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);
}
@@ -296,7 +298,7 @@ int main(int ac, char **av)
while(1) {
int c;
- c = getopt_long(ac, av, "l:c:eEk", long_options,
+ c = getopt_long(ac, av, "l:c:b:eEk", long_options,
&option_index);
if (c < 0)
break;