View Issue Details

IDProjectCategoryView StatusLast Update
0000083easycwmpBugpublic2015-10-05 14:39
Reporterfeckert Assigned Tomohamed.kallel  
PriorityhighSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Summary0000083: factory reset does not work anymore on CC
DescriptionHello easycwmp Team,

Factory reset is not working anymore for all devices.
jffs2_mark_erase was removed in Changeset 40410 by nbd on 2014-04-07T12:29:42+02:00 (18 months ago).

I think we have to use jffs2mark. I have applied a patch for this.

Kind regards

Flo
TagsNo tags attached.
e-mail notification

Activities

feckert

2015-09-24 09:45

reporter  

006-TDT-Bugfix-factory-reset.patch (967 bytes)   
Index: easycwmp-1.1.6/ext/openwrt/scripts/easycwmp.sh
===================================================================
--- easycwmp-1.1.6.orig/ext/openwrt/scripts/easycwmp.sh
+++ easycwmp-1.1.6/ext/openwrt/scripts/easycwmp.sh
@@ -63,6 +63,7 @@ E_DOWNLOAD_FAIL_ACCESS_FILE="16"
 E_DOWNLOAD_FAIL_COMPLETE_DOWNLOAD="17"
 E_DOWNLOAD_FAIL_FILE_CORRUPTED="18"
 E_DOWNLOAD_FAIL_FILE_AUTHENTICATION="19"
+E_FACTORY_RESET_FAILURE="20"
 
 # define a 'name' command-line string flag
 DEFINE_boolean 'json' false 'send values using json' 'j'
@@ -309,9 +310,16 @@ handle_action() {
 		return
 	fi
 	if [ "$action" = "factory_reset" ]; then
-		jffs2_mark_erase "rootfs_data"
-		sync
-		reboot
+		/sbin/jffs2mark -y
+		fault_code="$?"
+		if [ "$fault_code" != "0" ]; then
+			let fault_code=$E_FACTORY_RESET_FAILURE+9000
+			common_json_output_fault "" "$fault_code"
+		else
+			sync
+			reboot
+			common_json_output_status "1"
+		fi
 	fi
 	
 	if [ "$action" = "reboot" ]; then

mohamed.kallel

2015-09-26 12:18

administrator   ~0000281

Thank you Fekert for your contribution. We will apply this patch in the future vesions (inchallah)

mohamed.kallel

2015-10-05 14:39

administrator   ~0000294

fixed in EasyCwmp-1.1.7

Issue History

Date Modified Username Field Change
2015-09-24 09:45 feckert New Issue
2015-09-24 09:45 feckert File Added: 006-TDT-Bugfix-factory-reset.patch
2015-09-26 12:18 mohamed.kallel Note Added: 0000281
2015-10-05 14:39 mohamed.kallel Note Added: 0000294
2015-10-05 14:39 mohamed.kallel Status new => resolved
2015-10-05 14:39 mohamed.kallel Resolution open => fixed
2015-10-05 14:39 mohamed.kallel Assigned To => mohamed.kallel