From: Daniel Golle Date: Mon, 1 Nov 2021 14:03:42 +0000 (+0000) Subject: base-files: drop get_partition_by_name shell function X-Git-Tag: v22.03.0-rc1~1367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73657dfbdd79e8cbafa218f8d04ceefad7b63404;p=thirdparty%2Fopenwrt.git base-files: drop get_partition_by_name shell function find_mmc_part provides a better alternative and all users of get_partition_by_name have been removed. Signed-off-by: Daniel Golle --- diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 2b152a3dfad..ec198b2375c 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -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() { # local disk="$1" local filename="$2"