btrfs-progs: mkfs: fix overwritten return value for mkfs
commit625223903e23b46de615e71e9860a17afcd87632
authorQu Wenruo <wqu@suse.com>
Thu, 19 Oct 2017 05:41:35 +0000 (19 13:41 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Nov 2017 14:59:00 +0000 (14 15:59 +0100)
tree077cdf07e14a4630d9557a0d59f3a8631d02073d
parenta00bfc200ccfd27fe2f2bc1d0cd92b81a7bba06f
btrfs-progs: mkfs: fix overwritten return value for mkfs

For mkfs failure, especially --rootdir errors like EPERM/ENOSPC, the out
branch will overwrite the return value, causing wrong status code.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
mkfs/main.c