btrfs-progs: dump-super: detect invalid checksum type
authorDavid Sterba <dsterba@suse.com>
Thu, 1 Sep 2016 17:54:04 +0000 (19:54 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Sep 2016 08:05:38 +0000 (10:05 +0200)
commitee7bb45ddc5e436a7f22fe170184575426dff9dc
treefa027d0d08986626bfd318c7e32228130dad2b09
parentdf96f8244d482401035464e4d3f8197b7b65912b
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>
cmds-inspect-dump-super.c