diff options
author | Jakub Sitnicki <jakub@cloudflare.com> | 2019-10-16 10:58:11 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-16 14:30:03 +0200 |
commit | 456a513bb5d494f169271b16334049d50c7e630b (patch) | |
tree | 7362eb620b49de91b4e160dedf8311251c7220fc /scripts/bpf_helpers_doc.py | |
parent | 5bc60de50dfea235634fdf38cbc992fb968d113b (diff) | |
download | linux-456a513bb5d494f169271b16334049d50c7e630b.tar.gz linux-456a513bb5d494f169271b16334049d50c7e630b.tar.bz2 linux-456a513bb5d494f169271b16334049d50c7e630b.zip |
scripts/bpf: Emit an #error directive known types list needs updating
Make the compiler report a clear error when bpf_helpers_doc.py needs
updating rather than rely on the fact that Clang fails to compile
English:
../../../lib/bpf/bpf_helper_defs.h:2707:1: error: unknown type name 'Unrecognized'
Unrecognized type 'struct bpf_inet_lookup', please add it to known types!
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191016085811.11700-1-jakub@cloudflare.com
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
-rwxr-xr-x | scripts/bpf_helpers_doc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/bpf_helpers_doc.py b/scripts/bpf_helpers_doc.py index 7df9ce598ff9..08300bc024da 100755 --- a/scripts/bpf_helpers_doc.py +++ b/scripts/bpf_helpers_doc.py @@ -489,7 +489,7 @@ class PrinterHelpers(Printer): if t in self.mapped_types: return self.mapped_types[t] print("") - print("Unrecognized type '%s', please add it to known types!" % t) + print("#error \"Unrecognized type '%s', please add it to known types!\"" % t) sys.exit(1) seen_helpers = set() |