diff packages/redboot/current/src/flash.c @ 2064:ef1d669d4888

* src/flash.c (fis_create): Print an error if the FIS directory is full when we try to create a new entry.
author asl
date Sat, 03 Sep 2005 13:10:21 +0000
parents adbedd54ee7b
children 5d5572c64422
line wrap: on
line diff
--- a/packages/redboot/current/src/flash.c
+++ b/packages/redboot/current/src/flash.c
@@ -909,6 +909,10 @@ fis_create(int argc, char *argv[])
                 break;
             }
         }
+	if (i >= fisdir_size/sizeof(*img)) {
+	    diag_printf("Can't find an empty slot in FIS directory!\n");
+	    return;
+	}
     }
     if (!no_copy) {
         // Safety check - make sure the address range is not within the code we're running