From 2abd317d27a26bbfa3da7fe3fe709da3fa0f09af Mon Sep 17 00:00:00 2001 From: Sandrine Bailleux Date: Wed, 15 Jun 2022 14:21:17 +0200 Subject: [PATCH] fix(measured-boot): fix verbosity level of RSS digests traces Most traces displayed by log_measurement() use the INFO verbosity level. Only the digests are unconditionally printed, regardless of the verbosity level. As a result, when the verbosity level is set lower than INFO (typically in release mode), only the digests are printed, which look weird and out of context. Change-Id: I0220977c35dcb636f1510d8a7a0a9e3d92548bdc Signed-off-by: Sandrine Bailleux --- lib/psa/measured_boot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/psa/measured_boot.c b/lib/psa/measured_boot.c index 693e01f99..90e4ef39d 100644 --- a/lib/psa/measured_boot.c +++ b/lib/psa/measured_boot.c @@ -14,8 +14,9 @@ #include "measured_boot_private.h" -static void print_byte_array(const uint8_t *array, size_t len) +static void print_byte_array(const uint8_t *array __unused, size_t len __unused) { +#if LOG_LEVEL >= LOG_LEVEL_INFO size_t i; if (array == NULL || len == 0U) { @@ -31,6 +32,7 @@ static void print_byte_array(const uint8_t *array, size_t len) } } } +#endif } static void log_measurement(uint8_t index,