From d4d0c0f02a67738907cc758e64ac8dff4bf0deee Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 31 Jan 2023 13:39:57 +0100 Subject: [PATCH] common: Provide blocksize and ecclength to udf fsck udf_test program used for verifying filesystem is not able to determine filesystem blocksize. Provide it in the options together with disabling ecclength as it is not used on harddrives. Reviewed-by: David Disseldorp Signed-off-by: Jan Kara Signed-off-by: Zorro Lang --- common/rc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 376a0138..1b837ff5 100644 --- a/common/rc +++ b/common/rc @@ -3088,9 +3088,13 @@ _check_udf_filesystem() fi local device=$1 - local opt_arg="" + local blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*(-b|--blocksize)[ =]?+([0-9]+).*/\2/p'` + if [ -z "$blksz" ]; then + blksz=512 + fi + local opt_arg="-ecclength 1 -blocksize $blksz" if [ $# -eq 2 ]; then - opt_arg="-lastvalidblock $(( $2 - 1 ))" + opt_arg+=" -lastvalidblock $(( $2 - 1 ))" fi rm -f $seqres.checkfs -- 2.39.5