From 370137d0bf7b49da700978adf245a51232a8d617 Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Sat, 31 May 2025 03:42:44 -0400 Subject: [PATCH] nss-drv: nss_stats: fix gawk regex compatibility It's not necessary to escape '#' and '=' in awk regexes, doing so causes gawk to throw warnings. Busybox awk is more permissive and does not throw warnings. Signed-off-by: Sean Khan --- qca-nss-drv/files/qca-nss-drv.debug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qca-nss-drv/files/qca-nss-drv.debug b/qca-nss-drv/files/qca-nss-drv.debug index ba583a4..3e95310 100644 --- a/qca-nss-drv/files/qca-nss-drv.debug +++ b/qca-nss-drv/files/qca-nss-drv.debug @@ -2,9 +2,9 @@ # shellcheck disable=2046,3037,3010 ############################################################################### # QCA NSS Driver Debug Script -# version 20240622 +# version 20250631 # -# Requires: NSS Driver 12.1+ +# Requires: NSS Driver 11.4+ # Usage: /lib/debug/qca-nss-drv (no arguments) # Description: Display non-zero NSS statistics with color highlighting # (requires a terminal that supports ANSI escape codes) @@ -18,8 +18,8 @@ function color(c, s) { if ($3 > 0) { if ($3 ~ /^[0-9]+/ && $3 > 0 && $0 ~ /%/ ) c = 3 if ($2 ~ /Avg/ ) c = 4 - if ($1 ~ /\#/ ) c = 7 - if ($3 ~ /^[0-9]+$/ && $3 > 0 && $0 ~ /\=/ ) c = 3 + if ($1 ~ /#/ ) c = 7 + if ($3 ~ /^[0-9]+$/ && $3 > 0 && $0 ~ /=/ ) c = 3 if ($0 ~ /<