Meta: Allow overriding the calculated disk image inode count

This commit is contained in:
Tim Schumacher 2023-04-15 23:04:25 +02:00 committed by Brian Gianforcaro
parent e887989c23
commit f7ac121ac4
Notes: sideshowbarker 2024-07-16 21:20:49 +09:00

View file

@ -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