]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpftool: use version from the kernel source tree
authorRoman Gushchin <guro@fb.com>
Wed, 27 Dec 2017 19:16:28 +0000 (19:16 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 30 Dec 2017 00:07:36 +0000 (01:07 +0100)
commit8f4adc888beea09f1f2a5d72a0a6f2093b08c6f8
treeab2beb6bab33de56eb5c407b864cfb783b0a1ca5
parent48c061fbe1fc6ef5ce6e296b5cb72111331ea843
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>
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/main.c