diff options
author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2005-09-29 23:38:24 +0000 |
---|---|---|
committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2005-09-29 23:38:24 +0000 |
commit | b0dcc11c4385b69a2dcf341c0dc0fa8b9c19ebc1 (patch) | |
tree | b1c86251140a79ee00f198b32ba63d118124d951 /sbin/ifconfig | |
parent | f3b509206168f1038b07c4c6aaada50ee68aaf4e (diff) | |
download | src-b0dcc11c4385b69a2dcf341c0dc0fa8b9c19ebc1.tar.gz src-b0dcc11c4385b69a2dcf341c0dc0fa8b9c19ebc1.zip |
Deprecate the useless argument to -vlandev.
Submitted by: Fredrik Lindberg <fli+freebsd-current at shapeshifter.se> (implementation)
Reviewed by: brooks
MFC after: 5 days
Notes
Notes:
svn path=/head/; revision=150736
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 9 | ||||
-rw-r--r-- | sbin/ifconfig/ifvlan.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 85cf484aa363..5ad1fc14b1ef 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1220,16 +1220,17 @@ interface recognizes that the parent interface supports insertion and extraction of VLAN tags on its own (usually in firmware) and that it should pass packets to and from the parent unaltered. -.It Fl vlandev Ar iface +.It Fl vlandev Op Ar iface If the driver is a .Xr vlan 4 -pseudo device, disassociate the physical interface -.Ar iface -from it. +pseudo device, disassociate the parent interface from it. This breaks the link between the .Xr vlan 4 interface and its parent, clears its VLAN tag, flags and its link address and shuts the interface down. +The +.Ar iface +argument is useless and hence deprecated. .El .Pp The diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index 493f5261b45c..361f415c1859 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -130,6 +130,9 @@ unsetvlandev(const char *val, int d, int s, const struct afswtch *afp) { struct vlanreq vreq; + if (val != NULL) + warnx("argument to -vlandev is useless and hence deprecated"); + bzero((char *)&vreq, sizeof(struct vlanreq)); ifr.ifr_data = (caddr_t)&vreq; @@ -148,7 +151,8 @@ unsetvlandev(const char *val, int d, int s, const struct afswtch *afp) static struct cmd vlan_cmds[] = { DEF_CMD_ARG("vlan", setvlantag), DEF_CMD_ARG("vlandev", setvlandev), - DEF_CMD_ARG("-vlandev", unsetvlandev), + /* XXX For compatibility. Should become DEF_CMD() some day. */ + DEF_CMD_OPTARG("-vlandev", unsetvlandev), DEF_CMD("vlanmtu", IFCAP_VLAN_MTU, setifcap), DEF_CMD("-vlanmtu", -IFCAP_VLAN_MTU, setifcap), DEF_CMD("vlanhwtag", IFCAP_VLAN_HWTAGGING, setifcap), |