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

Define attach_type_name in common.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
 399024   11168 1573160 1983352  1e4378 bpftool

After:

   text    data     bss     dec     hex filename
 398256   10880 1573160 1982296  1e3f58 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/20200624143154.13145-1-tklauser@distanz.ch
tools/bpf/bpftool/common.c
tools/bpf/bpftool/main.h