@@ -1722,6 +1722,7 @@ _check_generic_filesystem()
if [ "$iam" != "check" ]; then
exit 1
fi
+ return 1
fi
return 0
@@ -1823,6 +1824,7 @@ _check_xfs_filesystem()
if [ "$iam" != "check" ]; then
exit 1
fi
+ return 1
fi
return 0
@@ -1867,7 +1869,8 @@ _check_udf_filesystem()
$here/src/udf_test $OPT_ARG $device | tee $seqres.checkfs | egrep "Error|Warning" | \
_udf_test_known_error_filter | \
egrep -iv "Error count:.*[0-9]+.*total occurrences:.*[0-9]+|Warning count:.*[0-9]+.*total occurrences:.*[0-9]+" && \
- echo "Warning UDF Verifier reported errors see $seqres.checkfs."
+ echo "Warning UDF Verifier reported errors see $seqres.checkfs." && return 1
+ return 0
}
_check_xfs_test_fs()
@@ -1935,6 +1938,7 @@ _check_btrfs_filesystem()
if [ "$iam" != "check" ]; then
exit 1
fi
+ return 1
fi
return 0
So the callers could know if these functions find corruptions by the return value. Signed-off-by: Eryu Guan <eguan@redhat.com> --- v2: - write new commit message, the old one is not correct - split out the 'check' check as a separate patch common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)