The "fis list" command will not display the first directory entry if it
happens to start at address 0. The attached patch fixes this.


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
Index: redboot/current/src/flash.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/flash.c,v
retrieving revision 1.82
diff -u -r1.82 flash.c
--- redboot/current/src/flash.c 21 Jul 2006 13:55:44 -0000      1.82
+++ redboot/current/src/flash.c 1 Jun 2007 11:10:39 -0000
@@ -719,7 +719,7 @@
         img = (struct fis_image_desc *) fis_work_block;
         for (i = 0;  i < fisdir_size/sizeof(*img);  i++, img++) {
             if (img->u.name[0] != (unsigned char)0xFF) {
-                if ((img->flash_base > last_addr) && (img->flash_base < 
lowest_addr)) {
+                if ((img->flash_base >= last_addr) && (img->flash_base < 
lowest_addr)) {
                     lowest_addr = img->flash_base;
                     image_found = true;
                     image_indx = i;
@@ -740,7 +740,7 @@
 #endif
                         (unsigned long)img->entry_point);
         }
-        last_addr = lowest_addr;
+        last_addr = lowest_addr + 1;
     } while (image_found == true);
 }
 

Reply via email to