aboot/sparse: Fix default case and flashing for sparse parsing
For don't care blocks the total_block needs to be updated as
this is used for the offset to write on emmc/mmc. Default
case is also missing the default tag and never enters
when an unrecognized type is detected.
Change-Id: Id96e0846e32f5479abb263df7fe9b771db1ff64b
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 1d7d286..c9a2f45 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -672,6 +672,9 @@
break;
case CHUNK_TYPE_DONT_CARE:
+ total_blocks += chunk_header->chunk_sz;
+ break;
+
case CHUNK_TYPE_CRC:
if(chunk_header->total_sz != sparse_header->chunk_hdr_sz)
{
@@ -682,6 +685,7 @@
data += chunk_data_sz;
break;
+ default:
fastboot_fail("Unknown chunk type");
return;
}