common/xfs: change _xfs_mkfs_validation_check return logic
PATCH 1/1 common/xfs: change _xfs_mkfs_validation_check return logic
_xfs_mkfs_validation_check() try to make sure mkfs.xfs the stricter input checks. It runs two test command lines with illegal parameters:
$cmd -s size=2s
$cmd -l version=2,su=260k
The current logic think if both of them return 0 (can't find illegal input), then it means the current xfsprogs doesn't support the stricter input checks.
But when test on machine with 4k sector size disk, the first command will return non-zero, and then _xfs_mkfs_validation_check() return non-zero to _require_xfs_mkfs_validation(). The latter will assume xfsprogs support the stricter input checks.
So I think the proper logic should be if "any" of test command lines return 0, then it means xfsprogs can't do stricter input test.
--- common/xfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/xfs +1 -1
@@ -546,7 +546,7 @@ _xfs_mkfs_validation_check() local sum=$? $cmd -l version=2,su=260k >/dev/null 2>&1 - sum=`expr $sum + $?` + sum=`expr $sum \* $?` rm -f $tmpfile return $sum
Signature · 1 line
2.7.4