Skip to contentSkip to conversation

tools/resolve_btfids: Fix some error messages

PATCH Applied Brendan Jackman 3 participants 3 messages Dec 3, 2020 BPF

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/resolve_btfids: Fix some error messages

Add missing newlines and fix polarity of strerror argument.

---
 tools/bpf/resolve_btfids/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/bpf/resolve_btfids/main.c +3 -3
index dfa540d8a02d..e3ea569ee125 100644
@@ -454,7 +454,7 @@ static int symbols_collect(struct object *obj)
 			return -ENOMEM;
 
 		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);
 			return -1;
 		}
@@ -477,8 +477,8 @@ static int symbols_resolve(struct object *obj)
 	btf = btf__parse(obj->btf ?: obj->path, NULL);
 	err = libbpf_get_error(btf);
 	if (err) {
-		pr_err("FAILED: load BTF from %s: %s",
-			obj->path, strerror(err));
+		pr_err("FAILED: load BTF from %s: %s\n",
+			obj->path, strerror(-err));
 		return -1;
 	}
 

base-commit: 97306be45fbe7a02461c3c2a57e666cf662b1aaf

Signature · 1 line
2.29.2.454.gaff20da3a2-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Brendan Jackman

Add missing newlines and fix polarity of strerror argument.

thanks,
jirka

Quoted 33 lines
---
 tools/bpf/resolve_btfids/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/bpf/resolve_btfids/main.c +3 -3
index dfa540d8a02d..e3ea569ee125 100644
@@ -454,7 +454,7 @@ static int symbols_collect(struct object *obj)
 			return -ENOMEM;
 
 		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);
 			return -1;
 		}
@@ -477,8 +477,8 @@ static int symbols_resolve(struct object *obj)
 	btf = btf__parse(obj->btf ?: obj->path, NULL);
 	err = libbpf_get_error(btf);
 	if (err) {
-		pr_err("FAILED: load BTF from %s: %s",
-			obj->path, strerror(err));
+		pr_err("FAILED: load BTF from %s: %s\n",
+			obj->path, strerror(-err));
 		return -1;
 	}
 

base-commit: 97306be45fbe7a02461c3c2a57e666cf662b1aaf

Signature · 1 line
2.29.2.454.gaff20da3a2-goog