sys/reboot; if fcb_init() sees data it does not recognize in
the flash area allocated to it, erase that area.
@@ -96,10 +96,14 @@ reboot_init_handler(int log_store_type, uint8_t entries)
reboot_log_fcb.fl_entries = entries;
+ rc = fcb_init(fcbp);
+ if (rc) {
+ flash_area_erase(ptr, 0, ptr->fa_size);
rc = fcb_init(fcbp);
if (rc) {
return rc;
}
+ }
reboot_log_handler = (struct log_handler *)&log_fcb_handler;
if (rc) {
return rc;
