diff options
author | Gui Hecheng <guihc.fnst@cn.fujitsu.com> | 2014-11-27 10:01:34 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-11-27 18:36:55 +0100 |
commit | 05afee34683f5a57fba0b2f55375bef592bb3987 (patch) | |
tree | 1abba30cd4e5051321928e23ee75f26578b75f97 /cmds-filesystem.c | |
parent | 15ed5e2a91ff8e02ae600044b3d38dad1917fc7c (diff) |
btrfs-progs: fix return value problem for btrfs sub show
If you exec:
# btrfs sub show <dir> <== non-subvolume dir
The cmd print error messages as expected, but returns 0.
By convetion, it should return non-zero and we should explicitly
set it before it goto out.
With other pieces adopted:
1) removed a unnecessary return value set -EINVAL
2) fixed another code branch which may return 0 upon error.
3) with 2) applied, the ret = 0 follows can be removed
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-filesystem.c')
0 files changed, 0 insertions, 0 deletions