add lookup function for mtd parts

SVN-Revision: 5299
This commit is contained in:
Felix Fietkau 2006-10-26 01:35:50 +00:00
parent 9abdf580d9
commit 4346855974

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