Libbpf userspace function btf__new_empty
Creates an empty BTF object. Use btf__add_*()
to populate such BTF object.
Definition
struct btf *btf__new_empty(void);
Return
New BTF object instance which has to be eventually freed with btf__free()
On error, error-code-encoded-as-pointer is returned, not a NULL
. To extract error code from such a pointer libbpf_get_error
should be used. If libbpf_set_strict_mode(LIBBPF_STRICT_CLEAN_PTRS)
is enabled, NULL
is returned on error instead. In both cases thread-local errno
variable is always set to error code as well.
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome