]> asedeno.scripts.mit.edu Git - linux.git/commit
tools: bpftool: fix reading from /proc/config.gz
authorPeter Wu <peter@lekensteyn.nl>
Fri, 9 Aug 2019 00:39:11 +0000 (01:39 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 12 Aug 2019 09:07:16 +0000 (11:07 +0200)
commita664a834579ae8a6166ac9e5a3232976cab2c24d
tree297da431ae1c5022c9fc104033d0fcd6ed4d6d51
parent9f30cd568b392051e0dcfa69b7f8d6021b41ed2a
tools: bpftool: fix reading from /proc/config.gz

/proc/config has never existed as far as I can see, but /proc/config.gz
is present on Arch Linux. Add support for decompressing config.gz using
zlib which is a mandatory dependency of libelf anyway. Replace existing
stdio functions with gzFile operations since the latter transparently
handles uncompressed and gzip-compressed files.

Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/feature.c