[PATCH] devtools: fix awk regular expression

Stephen Hemminger stephen at networkplumber.org
Sun Oct 19 18:05:11 CEST 2025


The latest version of awk (in Debian testing) will give a warning
about invalid regular expression error.

	awk: line 6: regular expression compile failed (syntax error ^* or ^+)
	^+++ b/

Fix by using additional backslash escape.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 devtools/checkpatches.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 9fb8fd0a07..646d5d1513 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -320,10 +320,10 @@ check_experimental_tags() { # <patch>
 		current_file = "";
 		ret = 0;
 	}
-	/^+++ b\// {
+	/^\+++ b\// {
 		current_file = $2;
 	}
-	/^+.*__rte_experimental/ {
+	/^\+.*__rte_experimental/ {
 		if (current_file ~ ".c$" ) {
 			print "Please only put __rte_experimental tags in " \
 				"headers ("current_file")";
@@ -350,10 +350,10 @@ check_internal_tags() { # <patch>
 		current_file = "";
 		ret = 0;
 	}
-	/^+++ b\// {
+	/^\+++ b\// {
 		current_file = $2;
 	}
-	/^+.*__rte_internal/ {
+	/^\+.*__rte_internal/ {
 		if (current_file ~ ".c$" ) {
 			print "Please only put __rte_internal tags in " \
 				"headers ("current_file")";
-- 
2.51.0



More information about the dev mailing list