summaryrefslogtreecommitdiff
path: root/release/mkfsimage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'release/mkfsimage.sh')
-rw-r--r--release/mkfsimage.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/release/mkfsimage.sh b/release/mkfsimage.sh
index ca60a40d..181928f8 100644
--- a/release/mkfsimage.sh
+++ b/release/mkfsimage.sh
@@ -337,11 +337,13 @@ if [ "${COMPRESS-no}" = yes ]; then
SIZE=$(($TREE_SIZE * 110 / 100))
test $SIZE -lt $MIN_SIZE && SIZE=$MIN_SIZE
else
- SIZE=$MAX_SIZE
- if [ $TREE_SIZE -gt $SIZE ]; then
+ if [ $TREE_SIZE -gt $MAX_SIZE ]; then
echo 1>&2 "$0: $TREE: Too big (${TREE_SIZE}k) to fit in ${MAX_SIZE}k"
exit 10
fi
+ SIZE=$(($TREE_SIZE * 110 / 100))
+ test $SIZE -lt $MIN_SIZE && SIZE=$MIN_SIZE
+ test $SIZE -gt $MAX_SIZE && SIZE=$MAX_SIZE
fi
eval $ECHO "'# Zeroing disk image...'"