From 80e4da102181f1e2dc5ef7e33f0a879d4fcb181f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 15 Jul 1997 22:12:46 +0000 Subject: Let uncompressed images be smaller than the maximum size. --- release/mkfsimage.sh | 6 ++++-- 1 file 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...'" -- cgit v1.2.3