diff --git a/src/main/common/log.c b/src/main/common/log.c index 77f3a3d66b..050422561d 100644 --- a/src/main/common/log.c +++ b/src/main/common/log.c @@ -62,8 +62,8 @@ PG_RESET_TEMPLATE(logConfig_t, logConfig, ); #if defined(USE_BOOTLOG) -char dmesg_buffer[USE_BOOTLOG]; -char *dmesg_head = dmesg_buffer; +char bootlog_buffer[USE_BOOTLOG]; +char *bootlog_head = bootlog_buffer; #endif void logInit(void) @@ -142,14 +142,14 @@ static void logPrint(const char *buf, size_t size) } #ifdef USE_BOOTLOG - if ( (dmesg_head + size + 2) < (dmesg_buffer + USE_BOOTLOG) ) { + if ( (bootlog_head + size + 2) < (bootlog_buffer + USE_BOOTLOG) ) { for (unsigned int ii = 0; ii < size; ii++) { - *dmesg_head = buf[ii]; - dmesg_head++; + *bootlog_head = buf[ii]; + bootlog_head++; } - dmesg_head[0] = '\r'; - dmesg_head[1] = '\n'; - dmesg_head = dmesg_head + 2; + bootlog_head[0] = '\r'; + bootlog_head[1] = '\n'; + bootlog_head = bootlog_head + 2; } #endif } diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 5683b51aa7..c60dccfb25 100644 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -131,8 +131,8 @@ extern timeDelta_t cycleTime; // FIXME dependency on mw.c extern uint8_t detectedSensors[SENSOR_INDEX_COUNT]; #ifdef USE_BOOTLOG -extern char dmesg_buffer[USE_BOOTLOG]; -extern char *dmesg_head; +extern char bootlog_buffer[USE_BOOTLOG]; +extern char *bootlog_head; #endif static serialPort_t *cliPort; @@ -4804,11 +4804,11 @@ static void cliUbloxPrintSatelites(char *arg) #endif #ifdef USE_BOOTLOG -static void printDmesg(char *cmdline __attribute__((unused))) { - int size = dmesg_head - dmesg_buffer; +static void printBootLog(char *cmdline __attribute__((unused))) { + int size = bootlog_head - bootlog_buffer; cliPrintLinef("log size written: %i of %i bytes reserved", size, USE_BOOTLOG); for (int ii = 0; ii < size; ii++) { - cliWrite(dmesg_buffer[ii]); + cliWrite(bootlog_buffer[ii]); } } #endif @@ -4833,7 +4833,7 @@ const clicmd_t cmdTable[] = { CLI_COMMAND_DEF("bind_rx", "initiate binding for RX SPI or SRXL2", NULL, cliRxBind), #endif #if defined(USE_BOOTLOG) - CLI_COMMAND_DEF("bootlog", "show boot log", NULL, printDmesg), + CLI_COMMAND_DEF("bootlog", "show boot log", NULL, printBootLog), #endif #ifdef USE_LED_STRIP CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor),