Skip to content
Snippets Groups Projects
Commit dd58e15b authored by Felix Fietkau's avatar Felix Fietkau
Browse files

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


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

SVN-Revision: 40426
parent e99cfaaf
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,13 @@ include() { ...@@ -168,6 +168,13 @@ include() {
done done
} }
find_mtd_index() {
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
local INDEX="${PART##mtd}"
echo ${INDEX}
}
find_mtd_part() { find_mtd_part() {
local INDEX=$(find_mtd_index "$1") local INDEX=$(find_mtd_index "$1")
local PREFIX=/dev/mtdblock local PREFIX=/dev/mtdblock
......
# Copyright (C) 2006-2013 OpenWrt.org # 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() { find_mtd_chardev() {
local INDEX=$(find_mtd_index "$1") local INDEX=$(find_mtd_index "$1")
local PREFIX=/dev/mtd local PREFIX=/dev/mtd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment