Since in previous patches, we introduced the new open_ctree flag OPEN_CTREE_CHUNK_ONLY, switch btrfs-find-root to use it instead of the open_ctree_broken().
Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com> --- btrfs-find-root.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/btrfs-find-root.c b/btrfs-find-root.c index 6fa61cc..bc2b344 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -281,7 +281,6 @@ static int find_root(struct btrfs_root *root) int main(int argc, char **argv) { struct btrfs_root *root; - int dev_fd; int opt; int ret; @@ -309,14 +308,7 @@ int main(int argc, char **argv) exit(1); } - dev_fd = open(argv[optind], O_RDONLY); - if (dev_fd < 0) { - fprintf(stderr, "Failed to open device %s\n", argv[optind]); - exit(1); - } - - root = open_ctree_broken(dev_fd, argv[optind]); - close(dev_fd); + root = open_ctree(argv[optind], 0, OPEN_CTREE_CHUNK_ONLY); if (!root) { fprintf(stderr, "Open ctree failed\n"); -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html