diff options
| author | Felix Fietkau | 2007-04-16 23:29:44 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2007-04-16 23:29:44 +0000 |
| commit | 8702352491fce337b580ddcd8a0a5c98adf72a02 (patch) | |
| tree | 223ef8c95d47b0b44a2cbf7e9a96f27ccf1ef776 | |
| parent | 87aa42ef1dbdc28dcf161897308aa7723823b49d (diff) | |
| download | archive-8702352491fce337b580ddcd8a0a5c98adf72a02.tar.gz | |
add jffs2_mark_erase function for erasing jffs2 partitions on the next mount (typically faster than doing mtd erase manually)
SVN-Revision: 6978
| -rwxr-xr-x | package/base-files/files/etc/functions.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh index dac46a3497..86ea82de67 100755 --- 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" +} |