projects
/
openwrt
/
staging
/
jogo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9abdf58
)
add lookup function for mtd parts
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 26 Oct 2006 01:35:50 +0000
(
01:35
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 26 Oct 2006 01:35:50 +0000
(
01:35
+0000)
SVN-Revision: 5299
package/base-files/default/etc/functions.sh
patch
|
blob
|
history
diff --git
a/package/base-files/default/etc/functions.sh
b/package/base-files/default/etc/functions.sh
index 2abb6f81c9079c9ea586901bd095b638906b1b9a..bf87548ca53c8ad83feee2edbccfd6f09ee37ca6 100755
(executable)
--- 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}"
+}
+