add lookup function for mtd parts

SVN-Revision: 5299
master
Felix Fietkau 18 years ago
parent 9abdf580d9
commit 4346855974
  1. 7
      package/base-files/default/etc/functions.sh

@ -110,3 +110,10 @@ include() {
. $file
done
}
find_mtd_part() {
local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
PART="${PART##mtd}"
echo "${PART:+/dev/mtdblock/$PART}"
}

Loading…
Cancel
Save