base-files: remove unneeded '$' signs in nand.sh
When using Shell arithmetric evaluation via $((..)) the variables in the expression do not need to be prefixed by the '$' sign. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
ce8b535ed3
commit
287bd78e6f
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ nand_upgrade_prepare_ubi() {
|
||||||
local rootfs_length="$1"
|
local rootfs_length="$1"
|
||||||
local rootfs_type="$2"
|
local rootfs_type="$2"
|
||||||
local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)"
|
local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)"
|
||||||
[ -n "$rootfs_data_max" ] && rootfs_data_max=$(($rootfs_data_max))
|
[ -n "$rootfs_data_max" ] && rootfs_data_max=$((rootfs_data_max))
|
||||||
|
|
||||||
local kernel_length="$3"
|
local kernel_length="$3"
|
||||||
local has_env="${4:-0}"
|
local has_env="${4:-0}"
|
||||||
|
@ -195,7 +195,7 @@ nand_upgrade_prepare_ubi() {
|
||||||
if [ "$rootfs_type" != "ubifs" ]; then
|
if [ "$rootfs_type" != "ubifs" ]; then
|
||||||
local availeb=$(cat /sys/devices/virtual/ubi/$ubidev/avail_eraseblocks)
|
local availeb=$(cat /sys/devices/virtual/ubi/$ubidev/avail_eraseblocks)
|
||||||
local ebsize=$(cat /sys/devices/virtual/ubi/$ubidev/eraseblock_size)
|
local ebsize=$(cat /sys/devices/virtual/ubi/$ubidev/eraseblock_size)
|
||||||
local avail_size=$(( $availeb * $ebsize ))
|
local avail_size=$((availeb * ebsize))
|
||||||
local rootfs_data_size_param="-m"
|
local rootfs_data_size_param="-m"
|
||||||
if [ -n "$rootfs_data_max" ] &&
|
if [ -n "$rootfs_data_max" ] &&
|
||||||
[ "$rootfs_data_max" != "0" ] &&
|
[ "$rootfs_data_max" != "0" ] &&
|
||||||
|
|
Loading…
Reference in a new issue