|
|
7e752c |
From 8193c9eaecd5a9a5237424081c109df0d27770fd Mon Sep 17 00:00:00 2001
|
|
|
7e752c |
From: Phil Sutter <psutter@redhat.com>
|
|
|
7e752c |
Date: Thu, 25 Oct 2018 12:24:30 +0200
|
|
|
7e752c |
Subject: [PATCH] devlink: Fix error reporting in cmd_resource_set()
|
|
|
7e752c |
|
|
|
7e752c |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1602555
|
|
|
7e752c |
Upstream Status: iproute2.git commit b1ffc1f465928
|
|
|
7e752c |
|
|
|
7e752c |
commit b1ffc1f465928706e22d585932cead8d74f021de
|
|
|
7e752c |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
7e752c |
Date: Thu Oct 18 13:28:23 2018 +0200
|
|
|
7e752c |
|
|
|
7e752c |
devlink: Fix error reporting in cmd_resource_set()
|
|
|
7e752c |
|
|
|
7e752c |
resource_path_parse() returns either zero or a negative error code,
|
|
|
7e752c |
hence the negated value must be passed to strerror().
|
|
|
7e752c |
|
|
|
7e752c |
Fixes: 8cd644095842a ("devlink: Add support for devlink resource abstraction")
|
|
|
7e752c |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
7e752c |
Acked-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
7e752c |
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
7e752c |
---
|
|
|
7e752c |
devlink/devlink.c | 2 +-
|
|
|
7e752c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
7e752c |
|
|
|
7e752c |
diff --git a/devlink/devlink.c b/devlink/devlink.c
|
|
|
7e752c |
index 1142d16..7a5aef8 100644
|
|
|
7e752c |
--- a/devlink/devlink.c
|
|
|
7e752c |
+++ b/devlink/devlink.c
|
|
|
7e752c |
@@ -4457,7 +4457,7 @@ static int cmd_resource_set(struct dl *dl)
|
|
|
7e752c |
&dl->opts.resource_id,
|
|
|
7e752c |
&dl->opts.resource_id_valid);
|
|
|
7e752c |
if (err) {
|
|
|
7e752c |
- pr_err("error parsing resource path %s\n", strerror(err));
|
|
|
7e752c |
+ pr_err("error parsing resource path %s\n", strerror(-err));
|
|
|
7e752c |
goto out;
|
|
|
7e752c |
}
|
|
|
7e752c |
|
|
|
7e752c |
--
|
|
|
7e752c |
1.8.3.1
|
|
|
7e752c |
|