uvol: fix autopart handling double/float number

Consider only integer part of free space in megabytes when
deciding the boundaries of the to be created partition.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit f50a289e51)
This commit is contained in:
Daniel Golle 2022-08-14 20:51:37 +02:00
parent 32e4d8fa5a
commit 426ccd2e0c
1 changed files with 5 additions and 5 deletions

View File

@ -63,14 +63,14 @@ get_free_area() {
;;
[0-9]*)
case "$size" in
*"M")
[ "${size%%M}" -lt 100 ] && continue
;;
*"G" | *"T")
;;
*"k" | *"b")
continue
;;
*"M")
[ "${size%%.*M}" -lt 100 ] && continue
;;
*"G" | *"T")
;;
esac
[ "$found" ] || echo "start=$start, size=$((end - start))"
found=1