Revert "remove function find_mtd_part() from /lib/functions.sh"
Reverting commit 34641. Function find_mtd_part() is needed by some scripts deployed for certain targets but not including boot.sh after all. Still, all this certainly needs some love. SVN-Revision: 34642
This commit is contained in:
parent
1521cdda0f
commit
ee17703371
1 changed files with 9 additions and 0 deletions
|
@ -220,6 +220,15 @@ 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…
Reference in a new issue