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>
This commit is contained in:
parent
ad7d2e5270
commit
f50a289e51
1 changed files with 5 additions and 5 deletions
|
@ -63,14 +63,14 @@ get_free_area() {
|
||||||
;;
|
;;
|
||||||
[0-9]*)
|
[0-9]*)
|
||||||
case "$size" in
|
case "$size" in
|
||||||
*"M")
|
|
||||||
[ "${size%%M}" -lt 100 ] && continue
|
|
||||||
;;
|
|
||||||
*"G" | *"T")
|
|
||||||
;;
|
|
||||||
*"k" | *"b")
|
*"k" | *"b")
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
*"M")
|
||||||
|
[ "${size%%.*M}" -lt 100 ] && continue
|
||||||
|
;;
|
||||||
|
*"G" | *"T")
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
[ "$found" ] || echo "start=$start, size=$((end - start))"
|
[ "$found" ] || echo "start=$start, size=$((end - start))"
|
||||||
found=1
|
found=1
|
||||||
|
|
Loading…
Reference in a new issue