changeset 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 453dff0f4c80
children 376c93d0f526
files packages/redboot/current/ChangeLog packages/redboot/current/src/flash.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog
+++ b/packages/redboot/current/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-03  Isaac Claymore   <iclaymore@gmail.com>
+
+	* src/flash.c (fis_create): Print an error if the FIS directory is
+	full when we try to create a new entry.
+	
 2005-07-06  Isaac Claymore <iclaymore@gmail.com>
 
 	* src/fconfig.c: (get_config): Verify the length of the script is
--- 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