]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
devlink: Add json and pretty options to help and man
authorRoi Dayan <roid@mellanox.com>
Mon, 6 Mar 2017 09:06:18 +0000 (11:06 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 9 Mar 2017 01:59:01 +0000 (17:59 -0800)
While at it also fixed missing double dash for long opts.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
devlink/devlink.c
man/man8/devlink.8

index c357580a5b2470657d4c3f30ca7c070a3c31f113..e90226e48369bc22b3363f73e0e17d29cb9957a2 100644 (file)
@@ -2470,7 +2470,7 @@ static void help(void)
 {
        pr_err("Usage: devlink [ OPTIONS ] OBJECT { COMMAND | help }\n"
               "where  OBJECT := { dev | port | sb | monitor }\n"
-              "       OPTIONS := { -V[ersion] | -n[no-nice-names] }\n");
+              "       OPTIONS := { -V[ersion] | -n[no-nice-names] | -j[json] | -p[pretty] }\n");
 }
 
 static int dl_cmd(struct dl *dl)
index cf0563b902ab6bf2a114c1de93d28f8d37364b40..a480766cbbdbe432d72d1c70c0cd185629ddf800 100644 (file)
@@ -20,19 +20,29 @@ devlink \- Devlink tool
 .IR OPTIONS " := { "
 \fB\-V\fR[\fIersion\fR] |
 \fB\-n\fR[\fIno-nice-names\fR] }
+\fB\-j\fR[\fIjson\fR] }
+\fB\-p\fR[\fIpretty\fR] }
 
 .SH OPTIONS
 
 .TP
-.BR "\-V" , " -Version"
+.BR "\-V" , " --Version"
 Print the version of the
 .B devlink
 utility and exit.
 
 .TP
-.BR "\-n" , " -no-nice-names"
+.BR "\-n" , " --no-nice-names"
 Turn off printing out nice names, for example netdevice ifnames instead of devlink port identification.
 
+.TP
+.BR "\-j" , " --json"
+Generate JSON output.
+
+.TP
+.BR "\-p" , " --pretty"
+When combined with -j generate a pretty JSON output.
+
 .SS
 .I OBJECT