Skip to contentSkip to conversation

iplink: document the 'link change' subcommand

PATCH In review Matteo Croce 2 participants 5 messages Jul 24, 2019 – Jul 27, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iplink: document the 'link change' subcommand

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")
---
 ip/iplink.c           | 4 ++--
 man/man8/ip-link.8.in | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)
ip/iplink.c +2 -2
index 212a0885..be237c93 100644
@@ -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"
man/man8/ip-link.8.in +6 -1
index 883d8807..d4be1a0e 100644
@@ -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 "
Signature · 1 line
2.21.0
#1 lore raw
Quoted 6 lines · On Wed, 24 Jul 2019 21:12:18 +0200 Matteo Croce <[email protected]> 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")

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

#2 lore raw
Quoted 7 lines · Stephen Hemminger
Quoted 4 lines · On Wed, 24 Jul 2019 21:12:18 +0200 Matteo Croce <[email protected]> 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.

Quoted 6 lines
Quoted 2 lines
Fixes 1d93483985f0 ("iplink: use netlink for link configuration")

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.

Signature · 2 lines
Matteo Croce
per aspera ad upstream
#3 lore raw

PATCH 1/1 iplink: document 'change' option to ip link

In reply to Matteo Croce

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

---
 man/man8/ip-link.8.in | 5 +++++
 1 file changed, 5 insertions(+)
man/man8/ip-link.8.in +5 -0
index 883d88077d66..a8ae72d2b097 100644
@@ -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 "
Signature · 1 line
2.20.1
author Acked-by on v1 1/1
#4 lore raw

Re: [PATCH] iplink: document 'change' option to ip link

Quoted 27 lines · Stephen Hemminger

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

---
 man/man8/ip-link.8.in | 5 +++++
 1 file changed, 5 insertions(+)
man/man8/ip-link.8.in +5 -1
index 883d88077d66..a8ae72d2b097 100644
@@ -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 "
--
Quoted 2 lines

2.20.1

Signature · 2 lines
Matteo Croce
per aspera ad upstream