]> git.droids-corp.org - dpdk.git/commitdiff
devtools: forbid additions of __reserved
authorDavid Marchand <david.marchand@redhat.com>
Sat, 23 Oct 2021 10:29:00 +0000 (12:29 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 26 Nov 2021 17:15:47 +0000 (18:15 +0100)
__reserved is a reserved keyword in Windows system headers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
devtools/checkpatches.sh

index e2fef76fd823eb522900318e22cfd75a40e5125c..34a2e43845f10702721a34860819bc0509d9b571 100755 (executable)
@@ -118,6 +118,14 @@ check_forbidden_additions() { # <patch>
                -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
                "$1" || res=1
 
+       # forbid use of __reserved which is a reserved keyword in Windows system headers
+       awk -v FOLDERS="lib drivers app examples" \
+               -v EXPRESSIONS='\\<__reserved\\>' \
+               -v RET_ON_FAIL=1 \
+               -v MESSAGE='Using __reserved' \
+               -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+               "$1" || res=1
+
        # forbid use of experimental build flag except in examples
        awk -v FOLDERS='lib drivers app' \
                -v EXPRESSIONS='-DALLOW_EXPERIMENTAL_API allow_experimental_apis' \