diff options
Diffstat (limited to 'modules.d/slx-dmsetup/scripts/dmsetup-slx-device')
-rwxr-xr-x | modules.d/slx-dmsetup/scripts/dmsetup-slx-device | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules.d/slx-dmsetup/scripts/dmsetup-slx-device b/modules.d/slx-dmsetup/scripts/dmsetup-slx-device index 3551a6eb..65ee94b5 100755 --- a/modules.d/slx-dmsetup/scripts/dmsetup-slx-device +++ b/modules.d/slx-dmsetup/scripts/dmsetup-slx-device @@ -42,7 +42,7 @@ handle_unit() { case "$2" in [%]) # These are relative to the writable CoW device # Allow > 100% for over-provisioning - val="$(( writable_device_sz * val / 100 ))" + val="$(( remaining_device_sz * val / 100 ))" ;; [Kk]) potency=1 ;;& [Mm]) potency=2 ;;& @@ -58,7 +58,7 @@ handle_unit() { } parse_config() { - local writable_device_sz="$writable_device_sz" + local remaining_device_sz="$writable_device_sz" parse_config_int "$1" 0 parse_config_int "$1" 1 } @@ -131,7 +131,7 @@ parse_config_int() { esac # Decrease for upcoming calculations if we used fixed values here if [ "$rel_only" != 1 ]; then - (( writable_device_sz -= ( min + max ) / 2 )) + (( remaining_device_sz -= ( min + max ) / 2 )) fi done <<< "$1" } |