mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-11 09:24:50 +00:00
add jffs2_mark_erase function for erasing jffs2 partitions on the next mount (typically faster than doing mtd erase manually)
SVN-Revision: 6978
This commit is contained in:
parent
1612bd2f91
commit
45c01cae72
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user