diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-24 13:31:13 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-24 13:31:13 -0400 |
commit | b72469c072514317602d1345b3d19e2375a90ab5 (patch) | |
tree | 120ab9fde332c9d645500d8977471d066d9228ff /flash.c | |
parent | 6289747b35eef38cca5d5d3076b4ec6d33f9053f (diff) |
added diag:eprom:reset
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 ..."); |