Repository navigation
logger: add error message when reading sof/etrace instead of sof/trace - #3402
Conversation
Also works with clang. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Failing silently is not nice. Now prints instead:
TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
error: in logger_read(), fread(..., /sys/kernel/debug/sof/etrace) \
failed: Invalid argument(22)
Also make logger_read() and the process return [-]errno which can have
different values and some information instead of -ferror() which has
only one value (non-zero in theory, 1 in practice) hence no information.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
The first checkpatch warning recommends The second and last checkpatch warnings is because of ONE spurious space character. It's a |
|
Sorry I forgot to fix the PR Subject before adding reviewers |
| @@ -150,7 +150,7 @@ static int append_filter_config(struct convert_config *config, const char *input | |||
|
|
|||
There was a problem hiding this comment.
@marc-hb can you explain why do we need this commit?
There was a problem hiding this comment.
this commit turn on printf like formatting string vs argument list check in compilation time for asprintf and log_err functions
There was a problem hiding this comment.
The printf attribute finds run-time memory corruption at compile time, always seemed very useful to me. It works with clang too BTW (tested).
2 commits. Main one:
Failing silently is not nice. Now prints instead:
Also make logger_read() and the process return [-]errno which can have
different values and some information instead of -ferror() which has
only one value (non-zero in theory, 1 in practice) hence no information.
Signed-off-by: Marc Herbert marc.herbert@intel.com