projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1612bd2
)
add jffs2_mark_erase function for erasing jffs2 partitions on the next mount (typical...
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 16 Apr 2007 23:29:44 +0000
(23:29 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 16 Apr 2007 23:29:44 +0000
(23:29 +0000)
SVN-Revision: 6978
package/base-files/files/etc/functions.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/functions.sh
b/package/base-files/files/etc/functions.sh
index dac46a34977b5d0646f5e44f523348d518f6e6ca..86ea82de678d569f743273afd5510afbd361a385 100755
(executable)
--- a/
package/base-files/files/etc/functions.sh
+++ b/
package/base-files/files/etc/functions.sh
@@
-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"
+}