diff options
| author | Tom Rini <trini@konsulko.com> | 2020-10-28 08:34:11 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2020-10-28 08:34:11 -0400 |
| commit | a45da8f51eeb22f3c44928b0beabee819469e309 (patch) | |
| tree | 4f12560f10151c4fe5b7bb2a58e2b04bee035f45 /include | |
| parent | 986c980c8250849d9394fdf377a3de75edb11888 (diff) | |
| parent | 2a0cbf3bca372dcbc79048d475c817d4e462069e (diff) | |
Merge branch '2020-10-27-further-log-enhancements'
- Allow for log message continuation.
- Test fix, build time error checking for new categories
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/global_data.h | 20 | ||||
| -rw-r--r-- | include/log.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index ebb740d34f..0157af1aa4 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -363,6 +363,26 @@ struct global_data { * &enum log_fmt defines the bits of the bit mask. */ int log_fmt; + + /** + * @processing_msg: a log message is being processed + * + * This flag is used to suppress the creation of additional messages + * while another message is being processed. + */ + bool processing_msg; + /** + * @logc_prev: logging category of previous message + * + * This value is used as logging category for continuation messages. + */ + int logc_prev; + /** + * @logl_pref: logging level of the previous message + * + * This value is used as logging level for continuation messages. + */ + int logl_prev; #endif #if CONFIG_IS_ENABLED(BLOBLIST) /** diff --git a/include/log.h b/include/log.h index 6de5e611c7..58787a3532 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 */ |
