Starterkit 5 Release 1.6
[karo-tx-redboot.git] / packages / redboot / v2_0 / src / flash.c
index 86557d4..ac2dcf1 100644 (file)
@@ -723,33 +723,33 @@ fis_list(int argc, char *argv[])
     last_addr = 0;
     image_indx = 0;
     do {
-       image_found = false;
-       lowest_addr = 0xFFFFFFFF;
-       img = fis_work_block;
-       for (i = 0;  i < fisdir_size/sizeof(*img);  i++, img++) {
-           if (img->u.name[0] != 0xFF) {
-               if ((img->flash_base >= last_addr) && (img->flash_base < lowest_addr)) {
-                   lowest_addr = img->flash_base;
-                   image_found = true;
-                   image_indx = i;
+               image_found = false;
+               lowest_addr = 0xFFFFFFFF;
+               img = fis_work_block;
+               for (i = 0;  i < fisdir_size/sizeof(*img);  i++, img++) {
+                       if (img->u.name[0] != 0xFF) {
+                               if ((img->flash_base >= last_addr) && (img->flash_base < lowest_addr)) {
+                                       lowest_addr = img->flash_base;
+                                       image_found = true;
+                                       image_indx = i;
+                               }
+                       }
                }
-           }
-       }
-       if (image_found) {
-           img = fis_work_block;
-           img += image_indx;
-           diag_printf("%-16s  0x%08lX  0x%08lX  0x%08lX  0x%08lX\n", img->u.name,
-                       (unsigned long)img->flash_base,
+               if (image_found) {
+                       img = fis_work_block;
+                       img += image_indx;
+                       diag_printf("%-16s  0x%08lX  0x%08lX  0x%08lX  0x%08lX\n", img->u.name,
+                                               (unsigned long)img->flash_base,
 #ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
-                                               show_cksums ? img->file_cksum : img->mem_base,
+                                               show_cksums ? img->file_cksum : (unsigned long)img->mem_base,
                                                show_datalen ? img->data_length : img->size,
 #else
-                                               img->mem_base,
+                                               (unsigned long)img->mem_base,
                                                img->size,
 #endif
-                       (unsigned long)img->entry_point);
-       }
-       last_addr = lowest_addr + 1;
+                                               (unsigned long)img->entry_point);
+               }
+               last_addr = lowest_addr + 1;
     } while (image_found == true);
 }