All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] iplink: document the 'link change' subcommand
@ 2019-07-24 19:12 Matteo Croce
  2019-07-26 18:25 ` Stephen Hemminger
  2019-07-26 21:59 ` [PATCH] iplink: document 'change' option to ip link Stephen Hemminger
  0 siblings, 2 replies; 5+ messages in thread
From: Matteo Croce @ 2019-07-24 19:12 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, David Ahern

ip link can set parameters both via the 'set' and 'change' keyword.
In fact, 'change' is an alias for 'set'.
Document this in the help and manpage.

Fixes: 1d93483985f0 ("iplink: use netlink for link configuration")
Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 ip/iplink.c           | 4 ++--
 man/man8/ip-link.8.in | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 212a0885..be237c93 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -64,12 +64,12 @@ void iplink_usage(void)
 			"\n"
 			"	ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ]\n"
 			"\n"
-			"	ip link set { DEVICE | dev DEVICE | group DEVGROUP }\n"
+			"	ip link { set | change } { DEVICE | dev DEVICE | group DEVGROUP }\n"
 			"			[ { up | down } ]\n"
 			"			[ type TYPE ARGS ]\n");
 	} else
 		fprintf(stderr,
-			"Usage: ip link set DEVICE [ { up | down } ]\n");
+			"Usage: ip link { set | change } DEVICE [ { up | down } ]\n");
 
 	fprintf(stderr,
 		"		[ arp { on | off } ]\n"
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 883d8807..d4be1a0e 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -1802,7 +1802,8 @@ deleted since it is the default group.
 .BI type " TYPE "
 specifies the type of the device.
 
-.SS ip link set - change device attributes
+.SS ip link set
+.SS ip link change - change device attributes
 
 .PP
 .B Warning:
@@ -1815,6 +1816,10 @@ can move the system to an unpredictable state. The solution
 is to avoid changing several parameters with one
 .B ip link set
 call.
+.B set
+and
+.B change
+are synonyms and have identical syntax and behavior.
 
 .TP
 .BI dev " DEVICE "
-- 
2.21.0


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

* Re: [PATCH iproute2] iplink: document the 'link change' subcommand
  2019-07-24 19:12 [PATCH iproute2] iplink: document the 'link change' subcommand Matteo Croce
@ 2019-07-26 18:25 ` Stephen Hemminger
  2019-07-26 19:01   ` Matteo Croce
  2019-07-26 21:59 ` [PATCH] iplink: document 'change' option to ip link Stephen Hemminger
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2019-07-26 18:25 UTC (permalink / raw)
  To: Matteo Croce; +Cc: netdev, David Ahern

On Wed, 24 Jul 2019 21:12:18 +0200
Matteo Croce <mcroce@redhat.com> wrote:

> ip link can set parameters both via the 'set' and 'change' keyword.
> In fact, 'change' is an alias for 'set'.
> Document this in the help and manpage.
> 
> Fixes: 1d93483985f0 ("iplink: use netlink for link configuration")
> Signed-off-by: Matteo Croce <mcroce@redhat.com>

Probably just done originally for compatibility in some way with ip route.
Not sure if it really needs to be documented.

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

* Re: [PATCH iproute2] iplink: document the 'link change' subcommand
  2019-07-26 18:25 ` Stephen Hemminger
@ 2019-07-26 19:01   ` Matteo Croce
  0 siblings, 0 replies; 5+ messages in thread
From: Matteo Croce @ 2019-07-26 19:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, David Ahern

On July 26, 2019 8:25:14 PM GMT+02:00, Stephen Hemminger <stephen@networkplumber.org> wrote:
> On Wed, 24 Jul 2019 21:12:18 +0200
> Matteo Croce <mcroce@redhat.com> wrote:
> 
> > ip link can set parameters both via the 'set' and 'change' keyword.
> > In fact, 'change' is an alias for 'set'.
> > Document this in the help and manpage.
> > 
> > Fixes: 1d93483985f0 ("iplink: use netlink for link configuration")
> > Signed-off-by: Matteo Croce <mcroce@redhat.com>
> 
> Probably just done originally for compatibility in some way with ip
> route.
> Not sure if it really needs to be documented.

Maybe not in the output help, but in the manpage we should state it.
-- 
Matteo Croce
per aspera ad upstream

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

* [PATCH] iplink: document 'change' option to ip link
  2019-07-24 19:12 [PATCH iproute2] iplink: document the 'link change' subcommand Matteo Croce
  2019-07-26 18:25 ` Stephen Hemminger
@ 2019-07-26 21:59 ` Stephen Hemminger
  2019-07-27  0:45   ` Matteo Croce
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2019-07-26 21:59 UTC (permalink / raw)
  To: mcroce; +Cc: netdev, Stephen Hemminger

Add the command alias "change" to man page.
Don't show it on usage, since it is not commonly used.

Reported-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 man/man8/ip-link.8.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 883d88077d66..a8ae72d2b097 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -1815,6 +1815,11 @@ can move the system to an unpredictable state. The solution
 is to avoid changing several parameters with one
 .B ip link set
 call.
+The modifier
+.B change
+is equivalent to
+.BR "set" .
+
 
 .TP
 .BI dev " DEVICE "
-- 
2.20.1


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

* Re: [PATCH] iplink: document 'change' option to ip link
  2019-07-26 21:59 ` [PATCH] iplink: document 'change' option to ip link Stephen Hemminger
@ 2019-07-27  0:45   ` Matteo Croce
  0 siblings, 0 replies; 5+ messages in thread
From: Matteo Croce @ 2019-07-27  0:45 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On Sat, Jul 27, 2019 at 12:00 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Add the command alias "change" to man page.
> Don't show it on usage, since it is not commonly used.
>
> Reported-off-by: Matteo Croce <mcroce@redhat.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  man/man8/ip-link.8.in | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
> index 883d88077d66..a8ae72d2b097 100644
> --- a/man/man8/ip-link.8.in
> +++ b/man/man8/ip-link.8.in
> @@ -1815,6 +1815,11 @@ can move the system to an unpredictable state. The solution
>  is to avoid changing several parameters with one
>  .B ip link set
>  call.
> +The modifier
> +.B change
> +is equivalent to
> +.BR "set" .
> +
>
>  .TP
>  .BI dev " DEVICE "
> --
> 2.20.1
>

Acked-by: Matteo Croce <mcroce@redhat.com>

-- 
Matteo Croce
per aspera ad upstream

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

end of thread, other threads:[~2019-07-27  0:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 19:12 [PATCH iproute2] iplink: document the 'link change' subcommand Matteo Croce
2019-07-26 18:25 ` Stephen Hemminger
2019-07-26 19:01   ` Matteo Croce
2019-07-26 21:59 ` [PATCH] iplink: document 'change' option to ip link Stephen Hemminger
2019-07-27  0:45   ` Matteo Croce

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.