auto-sync

This commit is contained in:
rusEfi 2014-11-08 20:06:49 -06:00
parent ba1194ea8e
commit 56c01c7951
2 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,8 @@ char *ftoa(char *p, double num, unsigned long precision) {
} }
#endif #endif
#include "error_handling.h"
/** /**
* @brief System formatted output function. * @brief System formatted output function.
* @details This function implements a minimal @p vprintf()-like functionality * @details This function implements a minimal @p vprintf()-like functionality
@ -131,6 +133,9 @@ void chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap) {
char tmpbuf[MAX_FILLER + 1]; char tmpbuf[MAX_FILLER + 1];
#endif #endif
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#1c");
while (TRUE) { while (TRUE) {
c = *fmt++; c = *fmt++;
if (c == 0) if (c == 0)

View File

@ -108,6 +108,7 @@ void appendFast(Logging *logging, const char *text) {
static void vappendPrintfI(Logging *logging, const char *fmt, va_list arg) { static void vappendPrintfI(Logging *logging, const char *fmt, va_list arg) {
intermediateLoggingBuffer.eos = 0; // reset intermediateLoggingBuffer.eos = 0; // reset
efiAssertVoid(getRemainingStack(chThdSelf()) > 196, "lowstck#1b");
chvprintf((BaseSequentialStream *) &intermediateLoggingBuffer, fmt, arg); chvprintf((BaseSequentialStream *) &intermediateLoggingBuffer, fmt, arg);
intermediateLoggingBuffer.buffer[intermediateLoggingBuffer.eos] = 0; // need to terminate explicitly intermediateLoggingBuffer.buffer[intermediateLoggingBuffer.eos] = 0; // need to terminate explicitly
append(logging, (char *) intermediateLoggingBufferData); append(logging, (char *) intermediateLoggingBufferData);