add lookup function for mtd parts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5299 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
d60a55ea0e
commit
4cdea535e0
|
@ -110,3 +110,10 @@ include() {
|
||||||
. $file
|
. $file
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
find_mtd_part() {
|
||||||
|
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
|
||||||
|
PART="${PART##mtd}"
|
||||||
|
echo "${PART:+/dev/mtdblock/$PART}"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue