tools: bpftool: fix error message (prog -> object) [Linux 4.19.72]

This Linux kernel change "tools: bpftool: fix error message (prog -> object)" is included in the Linux 4.19.72 release. This change is authored by Jakub Kicinski <jakub.kicinski [at] netronome.com> on Tue Aug 6 17:19:22 2019 -0700. The commit for this change in Linux stable tree is 463d87b (patch) which is from upstream commit b3e78ad. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream b3e78ad.

tools: bpftool: fix error message (prog -> object)

[ Upstream commit b3e78adcbf991a4e8b2ebb23c9889e968ec76c5f ]

Change an error message to work for any object being
pinned not just programs.

Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 tools/bpf/bpftool/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index fcaf006..be7aebf 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -238,7 +238,7 @@ int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(__u32))

    fd = get_fd_by_id(id);
    if (fd < 0) {
-       p_err("can't get prog by id (%u): %s", id, strerror(errno));
+       p_err("can't open object by id (%u): %s", id, strerror(errno));
        return -1;
    }

Leave a Reply

Your email address will not be published. Required fields are marked *