tools, bpftool: Define prog_type_name array only once
authorTobias Klauser <tklauser@distanz.ch>
Wed, 24 Jun 2020 14:31:24 +0000 (16:31 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 25 Jun 2020 14:06:01 +0000 (16:06 +0200)
commit9023497d8746d355bac8ddbc65797a4f553726fd
treeb7ef80a995f76a54ca664f5869adb78a002ce14f
parent74765da176a0627e34bacf72826ec60c075cb62c
tools, bpftool: Define prog_type_name array only once

Define prog_type_name in prog.c instead of main.h so it is only defined
once. This leads to a slight decrease in the binary size of bpftool.

Before:

   text    data     bss     dec     hex filename
 401032   11936 1573160 1986128  1e4e50 bpftool

After:

   text    data     bss     dec     hex filename
 399024   11168 1573160 1983352  1e4378 bpftool

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200624143124.12914-1-tklauser@distanz.ch
tools/bpf/bpftool/feature.c
tools/bpf/bpftool/link.c
tools/bpf/bpftool/main.h
tools/bpf/bpftool/map.c
tools/bpf/bpftool/prog.c