diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-26 01:35:50 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-26 01:35:50 +0000 |
commit | 43468559742afb1b6772f8fa851ee2e4d82e1ae7 (patch) | |
tree | 2a7e600fdda172cdca5ab585d531f4a240d1089d /package/base-files/default/etc | |
parent | 9abdf580d910e13ade68cbb23da9b5d83b839f8d (diff) | |
download | mtk-20170518-43468559742afb1b6772f8fa851ee2e4d82e1ae7.zip mtk-20170518-43468559742afb1b6772f8fa851ee2e4d82e1ae7.tar.gz mtk-20170518-43468559742afb1b6772f8fa851ee2e4d82e1ae7.tar.bz2 |
add lookup function for mtd parts
SVN-Revision: 5299
Diffstat (limited to 'package/base-files/default/etc')
-rwxr-xr-x | package/base-files/default/etc/functions.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/base-files/default/etc/functions.sh b/package/base-files/default/etc/functions.sh index 2abb6f8..bf87548 100755 --- a/package/base-files/default/etc/functions.sh +++ b/package/base-files/default/etc/functions.sh @@ -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}" +} + |