treewide: replace /sys/devices/virtual/ubi by /sys/class/ubi
[openwrt/staging/dedeckeh.git] / target / linux / ipq40xx / base-files / lib / upgrade / linksys.sh
index 5d25c20ad713c3b1c54a08051d31f44cad70ce44..c0d45d640ddf9b6db88b8db5590acc2e46b1bf6b 100644 (file)
@@ -3,7 +3,7 @@ linksys_get_target_firmware() {
 
        cur_boot_part="$(/usr/sbin/fw_printenv -n boot_part)"
        if [ -z "${cur_boot_part}" ]; then
-               mtd_ubi0=$(cat /sys/devices/virtual/ubi/ubi0/mtd_num)
+               mtd_ubi0=$(cat /sys/class/ubi/ubi0/mtd_num)
                case "$(grep -E "^mtd${mtd_ubi0}:" /proc/mtd | cut -d '"' -f 2)" in
                kernel|rootfs)
                        cur_boot_part=1