summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2005-09-29 23:38:24 +0000
committeryar <yar@FreeBSD.org>2005-09-29 23:38:24 +0000
commit090a602d2d67e8fa70b6edc4dfb996c096c75c8b (patch)
treeb1c86251140a79ee00f198b32ba63d118124d951 /sbin/ifconfig
parent20962cb412a5ff8a2e1a5236a5d312a18d91c2c1 (diff)
downloadFreeBSD-src-090a602d2d67e8fa70b6edc4dfb996c096c75c8b.zip
FreeBSD-src-090a602d2d67e8fa70b6edc4dfb996c096c75c8b.tar.gz
Deprecate the useless argument to -vlandev.
Submitted by: Fredrik Lindberg <fli+freebsd-current at shapeshifter.se> (implementation) Reviewed by: brooks MFC after: 5 days
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.89
-rw-r--r--sbin/ifconfig/ifvlan.c6
2 files changed, 10 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 85cf484..5ad1fc1 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 493f526..361f415 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),
OpenPOWER on IntegriCloud