From 1cff08ce5da0208c4838f426a99e81ee6504b503 Mon Sep 17 00:00:00 2001 From: Pzqqt <821026875@qq.com> Date: Wed, 5 Dec 2018 20:24:49 +0800 Subject: [PATCH] Fix possible error block counts Add "-k" parameter to force the unit to 1024 bytes. --- scripts/util_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index a2b5d88b5..d553d89fa 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -392,7 +392,7 @@ request_zip_size_check() { check_filesystem() { curSizeM=`wc -c < $1` curSizeM=$((curSizeM / 1048576)) - local DF=`df -P $2 | grep $2` + local DF=`df -Pk $2 | grep $2` curUsedM=`echo $DF | awk '{ print int($3 / 1024) }'` curFreeM=`echo $DF | awk '{ print int($4 / 1024) }'` }