Skip to content

Commit

Permalink
sys/log: Fix build with LOG_STORAGE_INFO enabled
Browse files Browse the repository at this point in the history
During some log_shell improvements printed storage info
was extended to show actual number of entries in the log.
Durin review function that counts number of entries was
dropped but call remained in log_shell resulting in
build error when LOG_STORAGE_INFO is 1

This restores original print for of storage info.

Signed-off-by: Jerzy Kasenberg <[email protected]>
  • Loading branch information
kasjer committed Oct 16, 2024
1 parent e540e2b commit 08847c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sys/log/full/src/log_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,8 @@ shell_log_storage_cmd(int argc, char **argv)
if (log_storage_info(log, &info)) {
console_printf("Storage info not supported for %s\n", log->l_name);
} else {
uint32_t entry_count = 0;
log_get_entry_count(log, &entry_count);
console_printf("%s: %d of %d used; %d entries\n", log->l_name,
(unsigned)info.used, (unsigned)info.size, (int)entry_count);
console_printf("%s: %d of %d used\n", log->l_name,
(unsigned)info.used, (unsigned)info.size);
#if MYNEWT_VAL(LOG_STORAGE_WATERMARK)
console_printf("%s: %d of %d used by unread entries\n", log->l_name,
(unsigned)info.used_unread, (unsigned)info.size);
Expand Down

0 comments on commit 08847c3

Please sign in to comment.