tools/bpftool: Fix error handing in do_skeleton()
authorYueHaibing <yuehaibing@huawei.com>
Fri, 17 Jul 2020 12:30:59 +0000 (20:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:59 +0000 (08:23 +0200)
commit56afb378cbf620b47e115b36ea40ed7468d14edd
treefc918460da04c7adf7e0f7e5ec59ebd033d999d0
parentff3e1a7d43e8f06aa839ac5f6b0c742750054b73
tools/bpftool: Fix error handing in do_skeleton()

[ Upstream commit 956fcfcd359512f15b19bcd157fa8206ed26605b ]

Fix pass 0 to PTR_ERR, also dump more err info using
libbpf_strerror.

Fixes: 5dc7a8b21144 ("bpftool, selftests/bpf: Embed object file inside skeleton")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200717123059.29624-1-yuehaibing@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/bpf/bpftool/gen.c