From 16e1a42ef309f7170bcdfa73e92a61042a6ddedd Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 5 May 2023 14:53:39 -0700 Subject: [PATCH] simulator crash fix #101 (cherry picked from commit fd98124304eacf056e8d6a000d4aa806350a6332) --- simulator/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simulator/main.cpp b/simulator/main.cpp index 4b298c7eed..3f89430461 100644 --- a/simulator/main.cpp +++ b/simulator/main.cpp @@ -17,6 +17,7 @@ #include "pch.h" #include "chprintf.h" #include "rusEfiFunctionalTest.h" +#include "flash_int.h" #include #include @@ -213,11 +214,13 @@ static std::string makeFileName(flashaddr_t addr) { 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 { std::filesystem::remove(makeFileName(address)); } catch (...) { } + + return FLASH_RETURN_SUCCESS; } int intFlashRead(flashaddr_t address, char* buffer, size_t size) {