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:
parent
32e4d8fa5a
commit
426ccd2e0c
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue