From 30adc5e1940131b786ea7f2dba245c74022b87a0 Mon Sep 17 00:00:00 2001 From: kcudnik Date: Tue, 19 Nov 2024 18:44:15 +0100 Subject: [PATCH] [meta] Rename values in saiattrversion.h To be prefixed with SAI_METADATA_ATTR_VERSION_ to not duplicate actual attribute names --- meta/attrversion.sh | 3 ++- meta/parse.pl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/attrversion.sh b/meta/attrversion.sh index 205744ab5..5cc72361c 100755 --- a/meta/attrversion.sh +++ b/meta/attrversion.sh @@ -44,4 +44,5 @@ TAGS=$(git tag --sort=v:refname | grep -P "^v\d+\.\d+.\d+$" | sed -n -e '/'$BASE (for tag in $TAGS; do git grep -P "^\s+SAI_\w+_ATTR_" $tag ../inc ../experimental | cat; done; grep -P "^\s+SAI_\w+_ATTR_" ../inc/sai*h ../experimental/sai*h | perl -npe '$_.="HEAD:"' ) | \ - perl -ne '/^(\S+):..\/(\S+)\/\S+.h:\s+(SAI_\w+_ATTR_\w+)/; print "#define $3 \"$1\" /* $2 */\n" if not defined $h{$3};$h{$3}=1' > $OUTPUT + perl -ne '/^(\S+):..\/(\S+)\/\S+.h:\s+(SAI_\w+_ATTR_\w+)/; + print "#define SAI_METADATA_ATTR_VERSION_$3 \"$1\" /* $2 */\n" if not defined $h{$3};$h{$3}=1' > $OUTPUT diff --git a/meta/parse.pl b/meta/parse.pl index 0c7677c2e..8ccabb198 100755 --- a/meta/parse.pl +++ b/meta/parse.pl @@ -4432,7 +4432,7 @@ sub ExtractAttrApiVersion for my $line (@lines) { - if (not $line =~ /#define (SAI_\w+_ATTR_\w+) "(v\d+\.\d+\.\d+|HEAD)"/) + if (not $line =~ /#define SAI_METADATA_ATTR_VERSION_(SAI_\w+_ATTR_\w+) "(v\d+\.\d+\.\d+|HEAD)"/) { LogError "invalid line in saiattrversion.h: $line"; next;