1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 05:42:59 +02:00

add jffs2_mark_erase function for erasing jffs2 partitions on the next mount (typically faster than doing mtd erase manually)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6978 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-04-16 23:29:44 +00:00
parent c96ef1722e
commit 6dbdf08f38

View File

@ -186,3 +186,13 @@ strtok() { # <string> { <variable> [<separator>] ... }
return $count
}
jffs2_mark_erase() {
local part="$(find_mtd_part "$1")"
[ -z "$part" ] && {
echo Partition not found.
return 1
}
echo -e "\xde\xad\xc0\xde" | mtd -qq write - "$1"
}