diff options
Diffstat (limited to 'flash.c')
-rw-r--r-- | flash.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -12,6 +12,7 @@ #include <sys/sendfile.h> #include <sys/stat.h> #include <mhash.h> +#include <glib.h> #define MAINFILE "/root/flash.copy" #define BACKUPFILE "/root/flash.bup" @@ -757,13 +758,15 @@ static void initFlashValues(FlashStruct *mem) } -void initFlash(FlashStruct *mem, int starting_location) +void initFlash(FlashStruct *mem, gboolean reset_to_defaults, int starting_location) { int read_size = readUserBlock(mem); if ( (read_size == 0) || (mem->fully_programmed == Not_Programmed) || - ((starting_location > 0) && (starting_location < sizeof(*mem))) ) { + (reset_to_defaults && + (starting_location >= 0) && + (starting_location < sizeof(*mem))) ) { g_print_debug ("initializing flash memory\n"); LCD_write(0,0,"Initialize Flash Memory ..."); |