diff options
| author | David Marchand <[email protected]> | 2023-11-17 14:18:23 +0100 |
|---|---|---|
| committer | David Marchand <[email protected]> | 2023-12-21 10:23:23 +0100 |
| commit | ab550c1d6a0893f00198017a3a0e7cd402a667fd (patch) | |
| tree | 464197904aa149fa246b1122176c4940173dbed3 /devtools | |
| parent | 0e21c7c07d623719d61cc7e2e85613e8c71d9a57 (diff) | |
log: add a per line log helper
gcc builtin __builtin_strchr can be used as a static assertion to check
whether passed format strings contain a \n.
This can be useful to detect double \n in log messages.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
Diffstat (limited to 'devtools')
| -rwxr-xr-x | devtools/checkpatches.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 10b79ca2bc..10d1bf490b 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -53,6 +53,14 @@ print_usage () { check_forbidden_additions() { # <patch> res=0 + # refrain from new calls to RTE_LOG + awk -v FOLDERS="lib" \ + -v EXPRESSIONS="RTE_LOG\\\(" \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Prefer RTE_LOG_LINE' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # refrain from new additions of rte_panic() and rte_exit() # multiple folders and expressions are separated by spaces awk -v FOLDERS="lib drivers" \ |
