mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00: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
d60a55ea0e
commit
4cdea535e0
@ -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