projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes...
[openwrt.git]
/
package
/
base-files
/
files
/
lib
/
functions.sh
diff --git
a/package/base-files/files/lib/functions.sh
b/package/base-files/files/lib/functions.sh
index
1b34b8f
..
e55cad0
100755
(executable)
--- a/
package/base-files/files/lib/functions.sh
+++ b/
package/base-files/files/lib/functions.sh
@@
-168,6
+168,13
@@
include() {
done
}
+find_mtd_index() {
+ local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
+ local INDEX="${PART##mtd}"
+
+ echo ${INDEX}
+}
+
find_mtd_part() {
local INDEX=$(find_mtd_index "$1")
local PREFIX=/dev/mtdblock