mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 23:09:45 +01:00
add lookup function for mtd parts
SVN-Revision: 5299
This commit is contained in:
parent
9abdf580d9
commit
4346855974
1 changed files with 7 additions and 0 deletions
|
|
@ -110,3 +110,10 @@ include() {
|
|||
. $file
|
||||
done
|
||||
}
|
||||
|
||||
find_mtd_part() {
|
||||
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
|
||||
PART="${PART##mtd}"
|
||||
echo "${PART:+/dev/mtdblock/$PART}"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue