Browse Source

base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes #15496)

Signed-off-by: Felix Fietkau <[email protected]>

SVN-Revision: 40426
Felix Fietkau 11 years ago
parent
commit
dd58e15b84

+ 7 - 0
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

+ 0 - 7
package/base-files/files/lib/functions/system.sh

@@ -1,12 +1,5 @@
 # Copyright (C) 2006-2013 OpenWrt.org
 
-find_mtd_index() {
-	local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
-	local INDEX="${PART##mtd}"
-
-	echo ${INDEX}
-}
-
 find_mtd_chardev() {
 	local INDEX=$(find_mtd_index "$1")
 	local PREFIX=/dev/mtd