1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-13 04:04:35 +03:00

imageBuilder.makeMBR: Fixes bug with gap

The size wasn't fixed after aligning the result, this dividing the sizes
by as the alignment.
This commit is contained in:
Samuel Dionne-Riel 2019-11-21 20:41:55 -05:00
parent bcc0f77156
commit e9b6c145fa

View File

@ -67,6 +67,7 @@ stdenvNoCC.mkDerivation rec {
start=$totalSize
size=${toString partition.length}
size=$(( $(if (($size % ${alignment})); then echo 1; else echo 0; fi ) + size / ${alignment} ))
size=$(( size * ${alignment} ))
totalSize=$(( totalSize + size ))
echo "Gap: start $start | size $size | totalSize $totalSize"
'';