From 9bed2b7a98d7ff03de4ea13cb79807f80f746b90 Mon Sep 17 00:00:00 2001 From: Maximilian Deubel Date: Tue, 12 Nov 2024 17:13:07 +0100 Subject: [PATCH] scripts: logging: dictionary: Add support for size_t %z format specifier This patch adds support for the size_t %z format specifier to the dictionary parser. It's the correct format to use for size_t types in modern C, but it's not supported in python directly. Signed-off-by: Maximilian Deubel --- scripts/logging/dictionary/dictionary_parser/log_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/logging/dictionary/dictionary_parser/log_parser.py b/scripts/logging/dictionary/dictionary_parser/log_parser.py index 07b0419b7d0..b95274b2285 100644 --- a/scripts/logging/dictionary/dictionary_parser/log_parser.py +++ b/scripts/logging/dictionary/dictionary_parser/log_parser.py @@ -46,6 +46,9 @@ def formalize_fmt_string(fmt_str): # No %p for pointer either, so use %x new_str = new_str.replace("%p", "0x%x") + # No %z support, use %d instead + new_str = new_str.replace("%z", "%d") + return new_str