mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 19:12:33 +08:00
remove function find_mtd_part() from /lib/functions.sh
Since all scripts using this function include /lib/functions/boot.sh - where this function is defined as well - it can be dropped from /lib/functions.sh. Also avoids further confusion about this function being declared and defined in two different places. SVN-Revision: 34641
This commit is contained in:
parent
eece71be56
commit
1521cdda0f
@ -220,15 +220,6 @@ include() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
find_mtd_part() {
|
|
||||||
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
|
|
||||||
local PREFIX=/dev/mtdblock
|
|
||||||
|
|
||||||
PART="${PART##mtd}"
|
|
||||||
[ -d /dev/mtdblock ] && PREFIX=/dev/mtdblock/
|
|
||||||
echo "${PART:+$PREFIX$PART}"
|
|
||||||
}
|
|
||||||
|
|
||||||
strtok() { # <string> { <variable> [<separator>] ... }
|
strtok() { # <string> { <variable> [<separator>] ... }
|
||||||
local tmp
|
local tmp
|
||||||
local val="$1"
|
local val="$1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user