1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-12 19:10:27 +03:00

s/dmesg/bootlog/g

This commit is contained in:
Ray Morris 2025-06-15 12:18:19 -05:00
parent fd971725c9
commit 3d6e80f53e
2 changed files with 14 additions and 14 deletions

View file

@ -62,8 +62,8 @@ PG_RESET_TEMPLATE(logConfig_t, logConfig,
); );
#if defined(USE_BOOTLOG) #if defined(USE_BOOTLOG)
char dmesg_buffer[USE_BOOTLOG]; char bootlog_buffer[USE_BOOTLOG];
char *dmesg_head = dmesg_buffer; char *bootlog_head = bootlog_buffer;
#endif #endif
void logInit(void) void logInit(void)
@ -142,14 +142,14 @@ static void logPrint(const char *buf, size_t size)
} }
#ifdef USE_BOOTLOG #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++) { for (unsigned int ii = 0; ii < size; ii++) {
*dmesg_head = buf[ii]; *bootlog_head = buf[ii];
dmesg_head++; bootlog_head++;
} }
dmesg_head[0] = '\r'; bootlog_head[0] = '\r';
dmesg_head[1] = '\n'; bootlog_head[1] = '\n';
dmesg_head = dmesg_head + 2; bootlog_head = bootlog_head + 2;
} }
#endif #endif
} }

View file

@ -131,8 +131,8 @@ extern timeDelta_t cycleTime; // FIXME dependency on mw.c
extern uint8_t detectedSensors[SENSOR_INDEX_COUNT]; extern uint8_t detectedSensors[SENSOR_INDEX_COUNT];
#ifdef USE_BOOTLOG #ifdef USE_BOOTLOG
extern char dmesg_buffer[USE_BOOTLOG]; extern char bootlog_buffer[USE_BOOTLOG];
extern char *dmesg_head; extern char *bootlog_head;
#endif #endif
static serialPort_t *cliPort; static serialPort_t *cliPort;
@ -4804,11 +4804,11 @@ static void cliUbloxPrintSatelites(char *arg)
#endif #endif
#ifdef USE_BOOTLOG #ifdef USE_BOOTLOG
static void printDmesg(char *cmdline __attribute__((unused))) { static void printBootLog(char *cmdline __attribute__((unused))) {
int size = dmesg_head - dmesg_buffer; int size = bootlog_head - bootlog_buffer;
cliPrintLinef("log size written: %i of %i bytes reserved", size, USE_BOOTLOG); cliPrintLinef("log size written: %i of %i bytes reserved", size, USE_BOOTLOG);
for (int ii = 0; ii < size; ii++) { for (int ii = 0; ii < size; ii++) {
cliWrite(dmesg_buffer[ii]); cliWrite(bootlog_buffer[ii]);
} }
} }
#endif #endif
@ -4833,7 +4833,7 @@ const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("bind_rx", "initiate binding for RX SPI or SRXL2", NULL, cliRxBind), CLI_COMMAND_DEF("bind_rx", "initiate binding for RX SPI or SRXL2", NULL, cliRxBind),
#endif #endif
#if defined(USE_BOOTLOG) #if defined(USE_BOOTLOG)
CLI_COMMAND_DEF("bootlog", "show boot log", NULL, printDmesg), CLI_COMMAND_DEF("bootlog", "show boot log", NULL, printBootLog),
#endif #endif
#ifdef USE_LED_STRIP #ifdef USE_LED_STRIP
CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor), CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor),