Commit Graph

12 Commits (886a8565e03bfacddc1383fe61439303226a8802)

Author SHA1 Message Date
David Sterba 1c880f34f1 btrfs-progs: move help defines to own header
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:45 +01:00
Omar Sandoval 9e02fbfcd3 btrfs-progs: format FREE_SPACE_TREE{,_VALID} nicely in dump-super
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
David Sterba 942dc5f29d btrfs-progs: dump-super: print chunks after validation
The fuzz test 005-simple-dump-super hits a crash, because we print the
chunks too early.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-05 12:39:01 +02:00
Domagoj Tršan ff9ee51677 btrfs-progs: change btrfs_csum_final result param type to u8
Signed-off-by: Domagoj Tršan <domagoj.trsan@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:35:50 +02:00
David Sterba 689b6249f3 btrfs-progs: dump-super: switch to common message helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:33:15 +02:00
David Sterba a5bd848719 btrfs-progs: dump-super: changes in options to specify superblocks
Some tools (check, select-super, dump-super) can use the alternate
superblocks, but the options are not consistent. To make it less
confusing, change the meaning of option -s in 'dump-super' to specify
the superblock copy, instead of taking the offset.

Though this is a change in UI, the old usage is detected and the result
would be the same, no breakage in existing scripts.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:46:33 +02:00
David Sterba ee7bb45ddc btrfs-progs: dump-super: detect invalid checksum type
The helper btrfs_super_csum_size unconditionally bugs on a bogus value,
the dump-super is supposed to dump even corrupted superblocks so this
must not happen here. Group the checsum values in the output and be more
robust agains garbage values.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-05 10:05:38 +02:00
David Sterba df96f8244d btrfs-progs: drop permission arg from non-creating open
The permissions do not make sense without O_CREATE mode.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-05 10:05:35 +02:00
David Sterba 17c7df6fed btrfs-progs: dump-super: add more long options
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 16:41:06 +01:00
David Sterba a54ef26e51 btrfs-progs: dump-super: switch to getopt_long
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 16:32:39 +01:00
David Sterba d66d44eacb btrfs-progs: switch more error messages to common helpers
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Alexander Fougner eaa93e3b02 btrfs-progs: introduce inspect-internal dump-super
The long-term plan is to merge the features of standalone tools
into the btrfs binary, reducing the number of shipped binaries.

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00