summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-04-15 23:04:25 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2023-04-15 19:41:08 -0700
commitf7ac121ac41d5f59c1835a6a8261341c37423846 (patch)
tree81314718ed5b0620e5904b4f2a4c6bf3c9462145 /Meta
parente887989c2395e6a8ef1bb38aed427990e21f7aa3 (diff)
downloadserenity-f7ac121ac41d5f59c1835a6a8261341c37423846.zip
Meta: Allow overriding the calculated disk image inode count
Diffstat (limited to 'Meta')
-rwxr-xr-xMeta/build-image-qemu.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh
index c586e71f57..f58734ea44 100755
--- a/Meta/build-image-qemu.sh
+++ b/Meta/build-image-qemu.sh
@@ -71,6 +71,13 @@ else
DISK_SIZE_BYTES="$SERENITY_DISK_SIZE_BYTES"
fi
+if [ -n "$SERENITY_INODE_COUNT" ]; then
+ if [ "$INODE_COUNT" -gt "$SERENITY_INODE_COUNT" ]; then
+ die "SERENITY_INODE_COUNT is set to $SERENITY_INODE_COUNT but required inode count is roughly $INODE_COUNT"
+ fi
+ INODE_COUNT="$SERENITY_INODE_COUNT"
+fi
+
nearest_power_of_2() {
local n=$1
local p=1