btrfs-progs/check
Qu Wenruo 6384f9df92 btrfs-progs: check: sanitize the return value for qgroup error
[BUG]
btrfs check can return strange return value for shell:
 [Inferior 1 (process 48641) exited with code 0213]
					      ^^^^

[CAUSE]
It's caused by the incorrect handling of qgroup error.

qgroup_report_ret can be -117 (-EUCLEAN), using that value with exit()
can cause overflow, causing return value not properly recognized.

[FIX]
Fix it by sanitize the return value to 0 or 1.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-04-01 19:56:42 +02:00
..
common.h btrfs-progs: check: move device_record to main.c 2019-10-14 17:27:41 +02:00
main.c btrfs-progs: check: sanitize the return value for qgroup error 2020-04-01 19:56:42 +02:00
mode-common.c btrfs-progs: move name hashing functions to ctree.h and delete hash.h 2020-03-31 18:37:35 +02:00
mode-common.h btrfs-progs: check/original: Fix inode mode in subvolume trees 2019-11-18 19:21:07 +01:00
mode-lowmem.c btrfs-progs: lots of typo fixes (codespell) 2020-03-31 18:37:38 +02:00
mode-lowmem.h btrfs-progs: check/lowmem: Check and repair root generation 2019-09-04 16:06:50 +02:00
mode-original.h btrfs-progs: check/original: Add check and repair for invalid inode generation 2019-11-18 19:21:07 +01:00
qgroup-verify.c btrfs-progs: qgroup-verify: Remove duplicated message in report_qgroups 2020-03-31 18:37:36 +02:00
qgroup-verify.h btrfs-progs: move qgroup-verify.[ch] to check/ 2019-10-14 17:27:35 +02:00