@@ -55,7 +55,7 @@ static uint16_t seq = 1;
55
55
static uint16_t flash_error_count = 0 ;
56
56
static uint8_t log_running = 0 ;
57
57
static uint16_t log_wrap_count = 0 ;
58
- static uint16_t log_buffer_overrun_count = 0 ;
58
+ static uint16_t log_buffer_overflow_count = 0 ;
59
59
static uint16_t log_compression_error = 0 ;
60
60
61
61
#if FLASH_LOG_COMPRESSION
@@ -71,8 +71,8 @@ uint16_t flash_log(uint16_t len, uint8_t *data)
71
71
/* check for buffer overflow */
72
72
if ( BUF_SIZE - BUF_LEN (buf_head ,my_tail ) <= len )
73
73
{
74
- log_buffer_overrun_count ++ ;
75
- status_flags |= ERROR_LOG_BUF_OVERRUN ;
74
+ log_buffer_overflow_count ++ ;
75
+ status_flags |= ERROR_LOG_BUF_OVERFLOW ;
76
76
return 0 ;
77
77
}
78
78
@@ -272,8 +272,10 @@ static int flash_log_write(uint8_t flush_buf)
272
272
LogBlock .env .len += poll_sz ;
273
273
274
274
/* handle block buffer overflow */
275
- if (LogBlock .env .len >= LOG_BLOCK_DATA_SIZE )
275
+ if (LogBlock .env .len >= LOG_BLOCK_DATA_SIZE ) {
276
+ status_flags |= ERROR_LOG_BLK_OVERFLOW ;
276
277
goto cleanup ;
278
+ }
277
279
} while (pres == HSER_POLL_MORE );
278
280
}
279
281
@@ -378,14 +380,14 @@ void flash_log_flush(void)
378
380
void flash_log_status (void )
379
381
{
380
382
debug_printf (
381
- "\n\rflash log status:\n\rrunning %i, wrapped %i, block: %i, block len: %i, head: %i, tail: %i, errors: %i, overruns : %i, compression: %i\n\r" ,
383
+ "\n\rflash log status:\n\rrunning %i, wrapped %i, block: %i, block len: %i, head: %i, tail: %i, errors: %i, overflows : %i, compression: %i\n\r" ,
382
384
log_running ,
383
385
log_wrap_count ,
384
386
current_block ,
385
387
LogBlock .env .len ,
386
388
buf_head - buffer , buf_tail - buffer ,
387
389
flash_error_count ,
388
- log_buffer_overrun_count ,
390
+ log_buffer_overflow_count ,
389
391
log_compression_error
390
392
);
391
393
}
0 commit comments