mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-26 22:11:05 +02: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:
parent
0d67238dc6
commit
11f6a780e5
@ -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…
x
Reference in New Issue
Block a user