mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-01 16:58:22 +00:00
add lookup function for mtd parts
SVN-Revision: 5299
This commit is contained in:
parent
9abdf580d9
commit
4346855974
@ -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…
x
Reference in New Issue
Block a user