summaryrefslogtreecommitdiff
path: root/btrfs-corrupt-block.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2016-09-08 12:29:10 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2016-09-08 12:29:10 +0100
commit249a3592d5dfdec0e52b5e9e712339364ea758ed (patch)
tree54a81f37cfdccbb5ba1d3c925e6fd9261311550e /btrfs-corrupt-block.c
parentca0dc13dd212ef8ca19fa6128115fe933b055437 (diff)
New upstream release. (Closes: #836778)debian/4.7.2-1
Diffstat (limited to 'btrfs-corrupt-block.c')
-rw-r--r--btrfs-corrupt-block.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index a488e479..789cbc70 100644
--- a/btrfs-corrupt-block.c
+++ b/btrfs-corrupt-block.c
@@ -103,32 +103,24 @@ static int debug_corrupt_block(struct extent_buffer *eb,
static void print_usage(int ret)
{
- 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 tree to be corrupted\n");
- fprintf(stderr, "\t-u Given chunk item to be corrupted\n");
- fprintf(stderr, "\t-U The whole chunk tree to be corrupted\n");
- fprintf(stderr, "\t-i The inode item to corrupt (must also specify "
- "the field to corrupt)\n");
- fprintf(stderr, "\t-x The file extent item to corrupt (must also "
- "specify -i for the inode and -f for the field to corrupt)\n");
- fprintf(stderr, "\t-m The metadata block to corrupt (must also "
- "specify -f for the field to corrupt)\n");
- fprintf(stderr, "\t-K The key to corrupt in the format "
- "<num>,<num>,<num> (must also specify -f for the field)\n");
- fprintf(stderr, "\t-f The field in the item to corrupt\n");
- fprintf(stderr, "\t-I An item to corrupt (must also specify the field "
- "to corrupt and a root+key for the item)\n");
- fprintf(stderr, "\t-D Corrupt a dir item, must specify key and field\n");
- fprintf(stderr, "\t-d Delete this item (must specify -K)\n");
- fprintf(stderr, "\t-r Operate on this root (only works with -d)\n");
- fprintf(stderr, "\t-C Delete a csum for the specified bytenr. When "
- "used with -b it'll delete that many bytes, otherwise it's "
- "just sectorsize\n");
+ printf("usage: btrfs-corrupt-block [options] device\n");
+ printf("\t-l Logical extent to be corrupted\n");
+ printf("\t-c Copy of the extent to be corrupted (usually 1 or 2, default: 0)\n");
+ printf("\t-b Number of bytes to be corrupted\n");
+ printf("\t-e Extent to be corrupted\n");
+ printf("\t-E The whole extent tree to be corrupted\n");
+ printf("\t-u Given chunk item to be corrupted\n");
+ printf("\t-U The whole chunk tree to be corrupted\n");
+ printf("\t-i The inode item to corrupt (must also specify the field to corrupt)\n");
+ printf("\t-x The file extent item to corrupt (must also specify -i for the inode and -f for the field to corrupt)\n");
+ printf("\t-m The metadata block to corrupt (must also specify -f for the field to corrupt)\n");
+ printf("\t-K The key to corrupt in the format <num>,<num>,<num> (must also specify -f for the field)\n");
+ printf("\t-f The field in the item to corrupt\n");
+ printf("\t-I An item to corrupt (must also specify the field to corrupt and a root+key for the item)\n");
+ printf("\t-D Corrupt a dir item, must specify key and field\n");
+ printf("\t-d Delete this item (must specify -K)\n");
+ printf("\t-r Operate on this root (only works with -d)\n");
+ printf("\t-C Delete a csum for the specified bytenr. When used with -b it'll delete that many bytes, otherwise it's just sectorsize\n");
exit(ret);
}