base-files: drop get_partition_by_name shell function
authorDaniel Golle <daniel@makrotopia.org>
Mon, 1 Nov 2021 14:03:42 +0000 (14:03 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 1 Nov 2021 18:01:02 +0000 (18:01 +0000)
find_mmc_part provides a better alternative and all users of
get_partition_by_name have been removed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/base-files/files/lib/upgrade/common.sh

index 2b152a3dfad8c119942e518a4a88ce479966b8cd..ec198b2375c28a0405907d6592006065cd9a68db 100644 (file)
@@ -220,15 +220,6 @@ hex_le32_to_cpu() {
        echo "$@"
 }
 
-get_partition_by_name() {
-       for partname in /sys/class/block/$1/*/name; do
-               [ "$(cat ${partname})" = "$2" ] && {
-                       basename ${partname%%/name}
-                       break
-               }
-       done
-}
-
 get_partitions() { # <device> <filename>
        local disk="$1"
        local filename="$2"