btrfs-progs: check: fix the return value bug of cmd_check()
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Tue, 20 Sep 2016 05:49:06 +0000 (13:49 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 14 Dec 2016 14:06:33 +0000 (15:06 +0100)
commitd1e8227ceb5adb8c3a40b0ab31d4787e400fd0df
tree8f3ea0f7b2b643383d3364409124ea35b0cb8dbf
parent21ca38e7dfa11ca45cef3e6c8a6cb6881c4fdd01
btrfs-progs: check: fix the return value bug of cmd_check()

The function cmd_check() is called by the main function of btrfs.c, its
return value will be returned by exit(). Resulting in the loss of
significant bits in some cases, for example this value is greater than
0377. If use a bool value "err" to store all of the return value, this
will solve the problem.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c