All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2 net-next] devlink: Add json and pretty options to help and man
@ 2017-03-06  9:06 Roi Dayan
  2017-03-06 10:41 ` Jiri Pirko
  2017-03-09  1:59 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Roi Dayan @ 2017-03-06  9:06 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Jiri Pirko, Paul Blakey, Roi Dayan

While at it also fixed missing double dash for long opts.

Signed-off-by: Roi Dayan <roid@mellanox.com>
---
 devlink/devlink.c  |  2 +-
 man/man8/devlink.8 | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index c357580..e90226e 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -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)
diff --git a/man/man8/devlink.8 b/man/man8/devlink.8
index cf0563b..a480766 100644
--- a/man/man8/devlink.8
+++ b/man/man8/devlink.8
@@ -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
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2 net-next] devlink: Add json and pretty options to help and man
  2017-03-06  9:06 [PATCH iproute2 net-next] devlink: Add json and pretty options to help and man Roi Dayan
@ 2017-03-06 10:41 ` Jiri Pirko
  2017-03-09  1:59 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2017-03-06 10:41 UTC (permalink / raw)
  To: Roi Dayan; +Cc: Stephen Hemminger, netdev, Jiri Pirko, Paul Blakey

Mon, Mar 06, 2017 at 10:06:18AM CET, roid@mellanox.com wrote:
>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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2 net-next] devlink: Add json and pretty options to help and man
  2017-03-06  9:06 [PATCH iproute2 net-next] devlink: Add json and pretty options to help and man Roi Dayan
  2017-03-06 10:41 ` Jiri Pirko
@ 2017-03-09  1:59 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-03-09  1:59 UTC (permalink / raw)
  To: Roi Dayan; +Cc: netdev, Jiri Pirko, Paul Blakey

On Mon,  6 Mar 2017 11:06:18 +0200
Roi Dayan <roid@mellanox.com> wrote:

> While at it also fixed missing double dash for long opts.
> 
> Signed-off-by: Roi Dayan <roid@mellanox.com>

Applied to master (for 4.11) this doesn't have to wait until net-next (4.12)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-09  2:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06  9:06 [PATCH iproute2 net-next] devlink: Add json and pretty options to help and man Roi Dayan
2017-03-06 10:41 ` Jiri Pirko
2017-03-09  1:59 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.