Btrfs-progs: fix magic return value in btrfs-zero-log.c

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
Wang Shilong 2013-09-04 23:22:31 +08:00 committed by Chris Mason
parent 2ce6b4bf24
commit aaf03176af

View File

@ -52,10 +52,11 @@ int main(int ac, char **av)
if((ret = check_mounted(av[1])) < 0) { if((ret = check_mounted(av[1])) < 0) {
fprintf(stderr, "Could not check mount status: %s\n", strerror(-ret)); fprintf(stderr, "Could not check mount status: %s\n", strerror(-ret));
return ret; goto out;
} else if(ret) { } else if(ret) {
fprintf(stderr, "%s is currently mounted. Aborting.\n", av[1]); fprintf(stderr, "%s is currently mounted. Aborting.\n", av[1]);
return -EBUSY; ret = -EBUSY;
goto out;
} }
root = open_ctree(av[1], 0, 1); root = open_ctree(av[1], 0, 1);
@ -68,5 +69,6 @@ int main(int ac, char **av)
btrfs_set_super_log_root_level(root->fs_info->super_copy, 0); btrfs_set_super_log_root_level(root->fs_info->super_copy, 0);
btrfs_commit_transaction(trans, root); btrfs_commit_transaction(trans, root);
close_ctree(root); close_ctree(root);
return ret; out:
return !!ret;
} }