mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-11-07 22:41:35 +00:00
Fix possible error block counts
Add "-k" parameter to force the unit to 1024 bytes.
This commit is contained in:
@@ -392,7 +392,7 @@ request_zip_size_check() {
|
|||||||
check_filesystem() {
|
check_filesystem() {
|
||||||
curSizeM=`wc -c < $1`
|
curSizeM=`wc -c < $1`
|
||||||
curSizeM=$((curSizeM / 1048576))
|
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) }'`
|
curUsedM=`echo $DF | awk '{ print int($3 / 1024) }'`
|
||||||
curFreeM=`echo $DF | awk '{ print int($4 / 1024) }'`
|
curFreeM=`echo $DF | awk '{ print int($4 / 1024) }'`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user