mirror of
https://github.com/kdave/btrfs-progs
synced 2025-03-05 02:07:51 +00:00
btrfs-progs: dump-tree: Fix duplicated output when using -t option
When using -t option to output trees not in root tree (chunk/root/log root), then we output the tree twice. Fix it Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
02947f4105
commit
3d4c030d7f
@ -371,21 +371,21 @@ again:
|
||||
if (tree_id && tree_id == BTRFS_ROOT_TREE_OBJECTID) {
|
||||
if (!info->tree_root->node) {
|
||||
error("cannot print root tree, invalid pointer");
|
||||
goto no_node;
|
||||
goto close_root;
|
||||
}
|
||||
printf("root tree\n");
|
||||
btrfs_print_tree(info->tree_root, info->tree_root->node, 1);
|
||||
goto no_node;
|
||||
goto close_root;
|
||||
}
|
||||
|
||||
if (tree_id && tree_id == BTRFS_CHUNK_TREE_OBJECTID) {
|
||||
if (!info->chunk_root->node) {
|
||||
error("cannot print chunk tree, invalid pointer");
|
||||
goto no_node;
|
||||
goto close_root;
|
||||
}
|
||||
printf("chunk tree\n");
|
||||
btrfs_print_tree(info->chunk_root, info->chunk_root->node, 1);
|
||||
goto no_node;
|
||||
goto close_root;
|
||||
}
|
||||
|
||||
key.offset = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user