mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
log: Handle line continuation
When multiple log() calls are used which don't end in newline, the log prefix is prepended multiple times in the same line. This makes the output look strange. Fix this by detecting when the previous log record did not end in newline. In that case, setting a flag. Drop the unused BUFFSIZE in the test while we are here. As an example implementation, update log_console to check the flag and produce the expected output. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
79d5983b61
commit
9ad7a6c25c
6 changed files with 60 additions and 16 deletions
|
@ -326,6 +326,8 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line,
|
|||
enum log_rec_flags {
|
||||
/** @LOGRECF_FORCE_DEBUG: Force output of debug record */
|
||||
LOGRECF_FORCE_DEBUG = BIT(0),
|
||||
/** @LOGRECF_CONT: Continuation of previous log record */
|
||||
LOGRECF_CONT = BIT(1),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue