summaryrefslogtreecommitdiffstats
path: root/target/linux/kirkwood
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-02-15 03:06:05 +0000
committerDaniel Golle <daniel@makrotopia.org>2023-02-15 03:27:59 +0000
commite8625c89efbbbe12a5934c10fc3478fd2f70fb21 (patch)
treedf96a66ab704dd1333293429da5a3e2a84a38cc3 /target/linux/kirkwood
parent62e583ddb9c1f8a5d760ff0612433c5e262fe481 (diff)
downloadopenwrt-e8625c89efbbbe12a5934c10fc3478fd2f70fb21.tar.gz
openwrt-e8625c89efbbbe12a5934c10fc3478fd2f70fb21.tar.bz2
openwrt-e8625c89efbbbe12a5934c10fc3478fd2f70fb21.zip
treewide: replace /sys/devices/virtual/ubi by /sys/class/ubi
Starting from Linux Kernel version 6.3 UBI devices will no longer be considered virtual, but rather have an MTD device parent. Hence they will no longer be listed under /sys/devices/virtual/ubi which is used in multiple places in OpenWrt. Prepare for future kernels by using /sys/class/ubi instead of /sys/devuces/virtual/ubi. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/kirkwood')
-rw-r--r--target/linux/kirkwood/base-files/lib/upgrade/linksys.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh b/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
index 7e20276fe5..9067f00e1a 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
@@ -8,7 +8,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