Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40426
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
# 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