From 873de8d0b72ace2fe35854ff17c94cc35ccc53ce Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 19 Mar 2024 15:07:44 +0100 Subject: [PATCH] board/netconf: Properly format disks of non-MiB-aliged sizes awk(1) will dutifully represented the size as a float, but test(1) was not at all amused. --- board/netconf/rootfs/libexec/infix/prod/fdisk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/netconf/rootfs/libexec/infix/prod/fdisk b/board/netconf/rootfs/libexec/infix/prod/fdisk index 81d32f40..f0999273 100755 --- a/board/netconf/rootfs/libexec/infix/prod/fdisk +++ b/board/netconf/rootfs/libexec/infix/prod/fdisk @@ -8,7 +8,7 @@ bootoffs=$2 bootsize=8M auxsize=8M -total=$(awk -vdisk="$(basename $disk)" '$4 == disk { print($3 / 1024); }' /proc/partitions) +total=$(awk -vdisk="$(basename $disk)" '$4 == disk { print(int($3 / 1024)); }' /proc/partitions) if [ "$total" -ge 4096 ]; then imgsize=1024M cfgsize=512M