fix for nrf52 lfs assert boot loop (#5670)

* fix for nrf52 lfs assert boot loop

* guard format in ifdef FSCom block

* add ifndef portduino for format call
This commit is contained in:
Tavis 2024-12-26 15:08:31 -08:00 committed by GitHub
parent b12ac6d564
commit b1d25ac7b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,6 +55,15 @@ extern "C" void lfs_assert(const char *reason)
{
LOG_ERROR("LFS assert: %s", reason);
lfs_assert_failed = true;
#ifndef ARCH_PORTDUINO
#ifdef FSCom
// CORRUPTED FILESYSTEM. This causes bootloop so
// might as well try formatting now.
LOG_ERROR("Trying FSCom.format()");
FSCom.format();
#endif
#endif
}
/**