Browse Source

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)
lilik-openwrt-22.03
Daniel Golle 2 years ago
parent
commit
426ccd2e0c
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      utils/uvol/files/autopart.defaults

+ 4
- 4
utils/uvol/files/autopart.defaults View File

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


Loading…
Cancel
Save