Thread (19 messages) 19 messages, 4 authors, 2019-01-24

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

From: Jakub Kicinski <hidden>
Date: 2019-01-24 18:59:46

On Thu, 24 Jan 2019 19:27:35 +0100, Maciej Fijałkowski wrote:
quoted
quoted
can live with this. In case of typo and program being not found it would be
good to print out the section names to choose from in usage().  
Agree, might be nice as well via libbpf.  
Would it be acceptable to print them from within libbpf? Something as trivial
as:
void
bpf_object__print_type_sections(struct bpf_object *obj,
				enum bpf_prog_type type)
{
	struct bpf_program *prog;

	bpf_object__for_each_program(prog, obj) {
		if (bpf_program__is_type(prog, type))
			pr_info("section %s\n", prog->section_name);
	}
}
Better not.
Or do we want to add a accessor for section_name and go through programs in
application?
bpf_program__title(), no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help