From ffedbbe4d3f88d722a53c4cf7280be5de0e772bc Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 4 Jul 2020 00:31:29 -0400 Subject: [PATCH] FATAL error: lsize mismatch 336/3342 #884 --- firmware/util/loggingcentral.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/firmware/util/loggingcentral.cpp b/firmware/util/loggingcentral.cpp index 30cbef7cfa..f475cbb2c2 100644 --- a/firmware/util/loggingcentral.cpp +++ b/firmware/util/loggingcentral.cpp @@ -12,7 +12,9 @@ #include "global.h" #include "efilib.h" -#if ! EFI_UNIT_TEST +#if EFI_UNIT_TEST +extern bool verboseMode; +#endif /* EFI_UNIT_TEST */ typedef char log_buf_t[DL_OUTPUT_BUFFER]; @@ -145,10 +147,19 @@ char * swapOutputBuffers(int *actualOutputBufferSize) { * * this is really 'global lock + printf + scheduleLogging + unlock' a bit more clear */ -void scheduleMsg(Logging *logging, const char *fmt, ...) { - for (unsigned int i = 0;ivappendPrintf(fmt, ap); + va_start(ap, format); + logging->vappendPrintf(format, ap); va_end(ap); appendMsgPostfix(logging); @@ -170,7 +181,6 @@ void scheduleMsg(Logging *logging, const char *fmt, ...) { unlockAnyContext(); } #endif /* EFI_TEXT_LOGGING */ +#endif /* EFI_UNIT_TEST */ } - -#endif /* EFI_UNIT_TEST */