summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 34ebffd..0552593 100644
--- a/src/main.c
+++ b/src/main.c
@@ -758,6 +758,23 @@ int main(int argc, char **argv) {
}
+ /* remove 2nd image when doing normal flash */
+ if ( dev_flash ) {
+ image_ptr = image_first;
+ while ( image_ptr ) {
+ struct image_list * next = image_ptr->next;
+ if ( image_ptr->image->type == IMAGE_2ND ) {
+ if ( image_ptr == image_first )
+ image_first = next;
+ image_list_del(image_ptr);
+ }
+ image_ptr = next;
+ }
+
+ /* make sure that fiasco_in has valid images */
+ if ( fiasco_in )
+ fiasco_in->first = image_first;
+ }
/* identify images */
if ( image_ident ) {