summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/database/nvp/parse_nvp_header.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools/database/nvp/parse_nvp_header.sh')
-rwxr-xr-xutils/nwztools/database/nvp/parse_nvp_header.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/nwztools/database/nvp/parse_nvp_header.sh b/utils/nwztools/database/nvp/parse_nvp_header.sh
index 8baab3c9eb..ee2be93516 100755
--- a/utils/nwztools/database/nvp/parse_nvp_header.sh
+++ b/utils/nwztools/database/nvp/parse_nvp_header.sh
@@ -66,13 +66,16 @@ else
>&2 echo "Analyzing $FILE"
fi
+# old format: #define ICX1087_NVP_NODE_APP "/dev/icx1087_nvp/0"
+# new format: #define ICX_NVP_NODE_APP ICX_NVP_NODE_BASE "0"
+
cat "$FILE" | awk ' \
BEGIN { \
- expr = "#define[[:space:]]+ICX_NVP_NODE_([[:alnum:]]+)[[:space:]]+ICX_NVP_NODE_BASE[[:space:]]*\"([[:digit:]]+)\""; \
+ expr = "#define[[:space:]]+ICX[[:digit:]]*_NVP_NODE_([[:alnum:]]+)[[:space:]]+(ICX_NVP_NODE_BASE[[:space:]]*\"|\"/dev.*_nvp/)([[:digit:]]+)\"";
} \
{ \
if($0 ~ expr) \
{ \
- print(tolower(gensub(expr, "\\1,\\2", "g", $0)));
+ print(tolower(gensub(expr, "\\1,\\3", "g", $0)));
} \
}'