]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
devlink: Fix inconsistency between command input and output
authorAya Levin <ayal@mellanox.com>
Wed, 2 Oct 2019 14:35:16 +0000 (17:35 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 9 Oct 2019 03:22:13 +0000 (20:22 -0700)
In devlink health show command the reporter's name parameter is called
reporter, but in the output the reporter's name is referred to as name

Before this patch:
$ devlink health show pci/0000:04:00.0 reporter tx
pci/0000:04:00.0:
   name tx
     state healthy error 0 recover 0 grace_period 500 auto_recover true

After this patch:
$ devlink health show pci/0000:04:00.0 reporter tx
pci/0000:04:00.0:
   reporter tx
     state healthy error 0 recover 0 grace_period 500 auto_recover true

Reported-by: Jiri Pirko <jiri@mellanox.com>
Fixes: 2f1242efe9d0 ("devlink: Add devlink health show command")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c

index 50baf82af93776a93642ac697fd4e8aa158f7996..5bbe0bddd910ad4616e761d5f203b4fc0e6682e2 100644 (file)
@@ -6660,7 +6660,7 @@ static void pr_out_health(struct dl *dl, struct nlattr **tb_health)
 
        pr_out_handle_start_arr(dl, tb_health);
 
-       pr_out_str(dl, "name",
+       pr_out_str(dl, "reporter",
                   mnl_attr_get_str(tb[DEVLINK_ATTR_HEALTH_REPORTER_NAME]));
        if (!dl->json_output) {
                __pr_out_newline();