]> Gentwo Git Trees - linux/.git/commit
bpftool: Refactor kernel config reading into common helper
authorYuan Chen <chenyuan@kylinos.cn>
Fri, 29 Aug 2025 06:11:06 +0000 (07:11 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Sep 2025 15:20:54 +0000 (17:20 +0200)
commit70f32a10ad423fd19e22e71d05d0968e61316278
tree69f780f449e3b779278dce2fe5f9111b863a5f56
parent98857d111c53954aa038fcbc4cf48873e4240f7c
bpftool: Refactor kernel config reading into common helper

Extract the kernel configuration file parsing logic from feature.c into
a new read_kernel_config() function in common.c. This includes:

1. Moving the config file handling and option parsing code
2. Adding required headers and struct definition
3. Keeping all existing functionality

The refactoring enables sharing this logic with other components while
maintaining current behavior. This will be used by subsequent patches
that need to check kernel config options.

Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Quentin Monnet <qmo@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20250829061107.23905-2-chenyuan_fl@163.com
tools/bpf/bpftool/common.c
tools/bpf/bpftool/feature.c
tools/bpf/bpftool/main.h