提交 5036be89 编写于 作者: B Brendan Jackman 提交者: Zheng Zengkai

tools/resolve_btfids: Fix some error messages

mainline inclusion
from mainline-5.11-rc1
commit 22e8ebe3
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=22e8ebe35a2e30ee19e02c41cacc99c2f896bc4b

-------------------------------------------------

Add missing newlines and fix polarity of strerror argument.
Signed-off-by: NBrendan Jackman <jackmanb@google.com>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Acked-by: NJiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/bpf/20201203102234.648540-1-jackmanb@google.com
(cherry picked from commit 22e8ebe3)
Signed-off-by: NWang Yufen <wangyufen@huawei.com>
上级 04c83d44
...@@ -459,7 +459,7 @@ static int symbols_collect(struct object *obj) ...@@ -459,7 +459,7 @@ static int symbols_collect(struct object *obj)
return -ENOMEM; return -ENOMEM;
if (id->addr_cnt >= ADDR_CNT) { if (id->addr_cnt >= ADDR_CNT) {
pr_err("FAILED symbol %s crossed the number of allowed lists", pr_err("FAILED symbol %s crossed the number of allowed lists\n",
id->name); id->name);
return -1; return -1;
} }
...@@ -482,8 +482,8 @@ static int symbols_resolve(struct object *obj) ...@@ -482,8 +482,8 @@ static int symbols_resolve(struct object *obj)
btf = btf__parse(obj->btf ?: obj->path, NULL); btf = btf__parse(obj->btf ?: obj->path, NULL);
err = libbpf_get_error(btf); err = libbpf_get_error(btf);
if (err) { if (err) {
pr_err("FAILED: load BTF from %s: %s", pr_err("FAILED: load BTF from %s: %s\n",
obj->path, strerror(err)); obj->path, strerror(-err));
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册