summaryrefslogtreecommitdiff
path: root/btrfs-select-super.c
diff options
context:
space:
mode:
Diffstat (limited to 'btrfs-select-super.c')
-rw-r--r--btrfs-select-super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/btrfs-select-super.c b/btrfs-select-super.c
index 51eb9c96..0c4f5c0a 100644
--- a/btrfs-select-super.c
+++ b/btrfs-select-super.c
@@ -84,8 +84,10 @@ int main(int ac, char **av)
root = open_ctree(av[optind], bytenr, 1);
- if (root == NULL)
+ if (!root) {
+ fprintf(stderr, "Open ctree failed\n");
return 1;
+ }
/* make the super writing code think we've read the first super */
root->fs_info->super_bytenr = BTRFS_SUPER_INFO_OFFSET;