From d094a0734cee439fc8483118694079c85b1cc3db Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 17 Oct 2020 14:31:58 +0200 Subject: log: allow for message continuation Some drivers use macro pr_cont() for continuing a message sent via printk. Hence if we want to convert printk messaging to using the logging system, we must support continuation of log messages too. As pr_cont() does not provide a message level we need a means of remembering the last log level. With the patch a pseudo log level LOGL_CONT as well as a pseudo log category LOGC_CONT are introduced. Using these results in the application of the same log level and category as in the previous log message. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/log.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/log.h') diff --git a/include/log.h b/include/log.h index 6de5e61..58787a3 100644 --- a/include/log.h +++ b/include/log.h @@ -38,6 +38,7 @@ enum log_level_t { LOGL_FIRST = LOGL_EMERG, LOGL_MAX = LOGL_DEBUG_IO, + LOGL_CONT = -1, /* Use same log level as in previous call */ }; /** @@ -65,6 +66,7 @@ enum log_category_t { LOGC_COUNT, /* Number of log categories */ LOGC_END, /* Sentinel value for a list of log categories */ + LOGC_CONT = -1, /* Use same category as in previous call */ }; /* Helper to cast a uclass ID to a log category */ -- cgit v1.1