linux-sg2042/tools/bpf/bpftool
Roman Gushchin 4bfe3bd3cc tools/bpftool: use version from the kernel source tree
Bpftool determines it's own version based on the kernel
version, which is picked from the linux/version.h header.

It's strange to use the version of the installed kernel
headers, and makes much more sense to use the version
of the actual source tree, where bpftool sources are.

Fix this by building kernelversion target and use
the resulting string as bpftool version.

Example:
before:

$ bpftool version
bpftool v4.14.6

after:
$ bpftool version
bpftool v4.15.0-rc3

$bpftool version --json
{"version":"4.15.0-rc3"}

Signed-off-by: Roman Gushchin <guro@fb.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2017-12-30 01:07:36 +01:00
..
Documentation bpftool: implement cgroup bpf operations 2017-12-14 13:37:13 +01:00
bash-completion tools: bpftool: add bash completion for bpftool 2017-10-29 18:37:33 +09:00
Makefile tools/bpftool: use version from the kernel source tree 2017-12-30 01:07:36 +01:00
cgroup.c bpftool: implement cgroup bpf operations 2017-12-14 13:37:13 +01:00
common.c bpftool: implement prog load command 2017-12-14 13:37:13 +01:00
jit_disasm.c tools: bpf: handle long path in jit disasm 2017-11-02 20:25:27 +09:00
json_writer.c tools: bpftool: add JSON output for `bpftool prog dump xlated *` command 2017-10-24 01:25:08 +01:00
json_writer.h tools: bpftool: add JSON output for `bpftool prog dump xlated *` command 2017-10-24 01:25:08 +01:00
main.c tools/bpftool: use version from the kernel source tree 2017-12-30 01:07:36 +01:00
main.h bpftool: implement cgroup bpf operations 2017-12-14 13:37:13 +01:00
map.c tools: bpftool: protect against races with disappearing objects 2017-12-23 01:09:52 +01:00
prog.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-12-29 15:42:26 -05:00