diff options
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/files/lib/upgrade/nand.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index e7ac34f5d0..907945b349 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -28,7 +28,7 @@ ubi_mknod() { nand_find_volume() { local ubidevdir ubivoldir - ubidevdir="/sys/devices/virtual/ubi/$1" + ubidevdir="/sys/class/ubi/" [ ! -d "$ubidevdir" ] && return 1 for ubivoldir in $ubidevdir/${1}_*; do [ ! -d "$ubivoldir" ] && continue @@ -41,13 +41,12 @@ nand_find_volume() { } nand_find_ubi() { - local ubidevdir ubidev mtdnum + local ubidevdir ubidev mtdnum cmtdnum mtdnum="$( find_mtd_index $1 )" [ ! "$mtdnum" ] && return 1 - for ubidevdir in /sys/devices/virtual/ubi/ubi*; do - [ ! -d "$ubidevdir" ] && continue + for ubidevdir in /sys/class/ubi/ubi*; do + [ ! -e "$ubidevdir/mtd_num" ] && continue cmtdnum="$( cat $ubidevdir/mtd_num )" - [ ! "$mtdnum" ] && continue if [ "$mtdnum" = "$cmtdnum" ]; then ubidev=$( basename $ubidevdir ) ubi_mknod "$ubidevdir" |