summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/btf.c
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@bytedance.com>2022-01-19 11:44:42 +0000
committerAndrii Nakryiko <andrii@kernel.org>2022-01-19 10:24:50 -0800
commit0ba3929e5b3d3fda05d3b9c8d0d20a90a084c19e (patch)
treec1d0987f6bf294413e71823b0b03253cb974e2be /tools/lib/bpf/btf.c
parentf1f3f67fd8ed6f512955bbbc76b04e9dc33ddeb6 (diff)
bpf/scripts: Raise an exception if the correct number of sycalls are not generated
Currently the syscalls rst and subsequently man page are auto-generated using function documentation present in bpf.h. If the documentation for the syscall is missing or doesn't follow a specific format, then that syscall is not dumped in the auto-generated rst. This patch checks the number of syscalls documented within the header file with those present as part of the enum bpf_cmd and raises an Exception if they don't match. It is not needed with the currently documented upstream syscalls, but can help in debugging when developing new syscalls when there might be missing or misformatted documentation. The function helper_number_check is moved to the Printer parent class and renamed to elem_number_check as all the most derived children classes are using this function now. Signed-off-by: Usama Arif <usama.arif@bytedance.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/bpf/20220119114442.1452088-3-usama.arif@bytedance.com
Diffstat (limited to 'tools/lib/bpf/btf.c')
0 files changed, 0 insertions, 0 deletions