forked from Mirrors/btrfs-progs
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>master
parent
02947f4105
commit
3d4c030d7f
|
@ -371,21 +371,21 @@ again:
|
||||||
if (tree_id && tree_id == BTRFS_ROOT_TREE_OBJECTID) {
|
if (tree_id && tree_id == BTRFS_ROOT_TREE_OBJECTID) {
|
||||||
if (!info->tree_root->node) {
|
if (!info->tree_root->node) {
|
||||||
error("cannot print root tree, invalid pointer");
|
error("cannot print root tree, invalid pointer");
|
||||||
goto no_node;
|
goto close_root;
|
||||||
}
|
}
|
||||||
printf("root tree\n");
|
printf("root tree\n");
|
||||||
btrfs_print_tree(info->tree_root, info->tree_root->node, 1);
|
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 (tree_id && tree_id == BTRFS_CHUNK_TREE_OBJECTID) {
|
||||||
if (!info->chunk_root->node) {
|
if (!info->chunk_root->node) {
|
||||||
error("cannot print chunk tree, invalid pointer");
|
error("cannot print chunk tree, invalid pointer");
|
||||||
goto no_node;
|
goto close_root;
|
||||||
}
|
}
|
||||||
printf("chunk tree\n");
|
printf("chunk tree\n");
|
||||||
btrfs_print_tree(info->chunk_root, info->chunk_root->node, 1);
|
btrfs_print_tree(info->chunk_root, info->chunk_root->node, 1);
|
||||||
goto no_node;
|
goto close_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
key.offset = 0;
|
key.offset = 0;
|
||||||
|
|
Loading…
Reference in New Issue