Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 lines
608 B
C
20 lines
608 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2020 Facebook */
|
|
#ifndef __BTF_HELPERS_H
|
|
#define __BTF_HELPERS_H
|
|
|
|
#include <stdio.h>
|
|
#include <bpf/btf.h>
|
|
|
|
int fprintf_btf_type_raw(FILE *out, const struct btf *btf, __u32 id);
|
|
const char *btf_type_raw_dump(const struct btf *btf, int type_id);
|
|
int btf_validate_raw(struct btf *btf, int nr_types, const char *exp_types[]);
|
|
|
|
#define VALIDATE_RAW_BTF(btf, raw_types...) \
|
|
btf_validate_raw(btf, \
|
|
sizeof((const char *[]){raw_types})/sizeof(void *),\
|
|
(const char *[]){raw_types})
|
|
|
|
const char *btf_type_c_dump(const struct btf *btf);
|
|
#endif
|