aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-04-08 21:17:49 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-04-08 21:17:49 +0000
commit991bea678a830313e1b0161c9ed21760e5dcee93 (patch)
tree0c3b807a26df4daf11569b4007c0ec749c3ed432 /package/base-files
parentf379312b9caf4588aa2a22ff3c597cf27873eb33 (diff)
downloadupstream-991bea678a830313e1b0161c9ed21760e5dcee93.tar.gz
upstream-991bea678a830313e1b0161c9ed21760e5dcee93.tar.bz2
upstream-991bea678a830313e1b0161c9ed21760e5dcee93.zip
base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes #15496)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40426 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh7
-rw-r--r--package/base-files/files/lib/functions/system.sh7
2 files changed, 7 insertions, 7 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 1b34b8f50d..e55cad0b20 100755
--- 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
diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh
index 7655460159..a4c0f2620c 100644
--- a/package/base-files/files/lib/functions/system.sh
+++ b/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