1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-07 21:21:59 +03:00

add lookup function for mtd parts

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5299 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-10-26 01:35:50 +00:00
parent 0d67238dc6
commit 11f6a780e5

View File

@ -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}"
}