treewide: replace /sys/devices/virtual/ubi by /sys/class/ubi
[openwrt/openwrt.git] / target / linux / bcm4908 / base-files / lib / preinit / 75_rootfs_prepare
index 09c12cd31db3806a67fc7acd4ddbafe797e25f97..829dd6adf1343a9ae0eeffceee6500777a6b17a5 100644 (file)
@@ -23,7 +23,7 @@ rootfs_prepare() {
        ubinfo /dev/ubi0 -N metadata1 > /dev/null 2>&1 || return
 
        # Find UBI volume device (e.g. ubi0_123)
-       local ubivol="$(grep rootfs_data /sys/devices/virtual/ubi/ubi*/ubi*/name | sed -n 's/.*\(ubi\d*_\d*\).*/\1/p')"
+       local ubivol="$(grep rootfs_data /sys/class/ubi/ubi*/name | sed -n 's/.*\(ubi\d*_\d*\).*/\1/p')"
        if [ -n "$ubivol" ]; then
                bcm4908_verify_rootfs_data $ubivol
        else