I made open_ctree fail if the chunk tree couldn't be open, which means that fsck
now segfaults if it can't open the chunk tree. So fix fsck to check the fs_info
we get back from open_ctree_fsinfo to make sure it's valid and exit if it's not
instead of segfaulting. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
}
info = open_ctree_fs_info(argv[optind], bytenr, rw, 1);
- if (info == NULL)
- return 1;
+ if (!info) {
+ fprintf(stderr, "Couldn't open file system\n");
+ return -EIO;
+ }
uuid_unparse(info->super_copy->fsid, uuidbuf);
printf("Checking filesystem on %s\nUUID: %s\n", argv[optind], uuidbuf);