add lookup function for mtd parts
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 26 Oct 2006 01:35:50 +0000 (01:35 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 26 Oct 2006 01:35:50 +0000 (01:35 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5299 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/default/etc/functions.sh

index 2abb6f8..bf87548 100755 (executable)
@@ -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}"
+}
+
This page took 0.024848 seconds and 4 git commands to generate.