mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
[simulation] fix error handling in simulation flash APIs (#5500)
This commit is contained in:
@@ -78,10 +78,10 @@ void otPlatFlashInit(otInstance *aInstance)
|
||||
}
|
||||
|
||||
sFlashFd = open(fileName, O_RDWR | O_CREAT | O_CLOEXEC, 0600);
|
||||
lseek(sFlashFd, 0, SEEK_SET);
|
||||
|
||||
VerifyOrDie(sFlashFd >= 0, OT_EXIT_ERROR_ERRNO);
|
||||
|
||||
lseek(sFlashFd, 0, SEEK_SET);
|
||||
|
||||
if (create)
|
||||
{
|
||||
for (uint8_t index = 0; index < SWAP_NUM; index++)
|
||||
|
||||
Reference in New Issue
Block a user