aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-zero-log.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2013-09-04 23:22:31 +0800
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:20:42 -0400
commitaaf03176afbb244079e967d9f3c7aa7fbc03bb85 (patch)
tree8527412b5145b7f367aa8fcc63729e59b15154c5 /btrfs-zero-log.c
parent2ce6b4bf248d68b42baf48f3d1163af6d4c7b962 (diff)
downloadbtrfs-progs-aaf03176afbb244079e967d9f3c7aa7fbc03bb85.tar.gz
btrfs-progs-aaf03176afbb244079e967d9f3c7aa7fbc03bb85.tar.xz
btrfs-progs-aaf03176afbb244079e967d9f3c7aa7fbc03bb85.zip
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>
Diffstat (limited to 'btrfs-zero-log.c')
-rw-r--r--btrfs-zero-log.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/btrfs-zero-log.c b/btrfs-zero-log.c
index f249aec..31ec215 100644
--- a/btrfs-zero-log.c
+++ b/btrfs-zero-log.c
@@ -52,10 +52,11 @@ int main(int ac, char **av)
if((ret = check_mounted(av[1])) < 0) {
fprintf(stderr, "Could not check mount status: %s\n", strerror(-ret));
- return ret;
+ goto out;
} else if(ret) {
fprintf(stderr, "%s is currently mounted. Aborting.\n", av[1]);
- return -EBUSY;
+ ret = -EBUSY;
+ goto out;
}
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_commit_transaction(trans, root);
close_ctree(root);
- return ret;
+out:
+ return !!ret;
}