simulator crash fix #101
(cherry picked from commit fd98124304eacf056e8d6a000d4aa806350a6332)
This commit is contained in:
parent
1caeaeafda
commit
16e1a42ef3
|
@ -17,6 +17,7 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "rusEfiFunctionalTest.h"
|
#include "rusEfiFunctionalTest.h"
|
||||||
|
#include "flash_int.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
@ -213,11 +214,13 @@ static std::string makeFileName(flashaddr_t addr) {
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
int intFlashErase(flashaddr_t address, size_t size) {
|
int intFlashErase(flashaddr_t address, size_t) {
|
||||||
// Try to delete the file, swallow any errors (we can overwrite it anyway)
|
// Try to delete the file, swallow any errors (we can overwrite it anyway)
|
||||||
try {
|
try {
|
||||||
std::filesystem::remove(makeFileName(address));
|
std::filesystem::remove(makeFileName(address));
|
||||||
} catch (...) { }
|
} catch (...) { }
|
||||||
|
|
||||||
|
return FLASH_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
|
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
|
||||||
|
|
Loading…
Reference in New Issue