summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig/ifvlan.c
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/ifvlan.c
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/ifvlan.c')
-rw-r--r--sbin/ifconfig/ifvlan.c6
1 files changed, 5 insertions, 1 deletions
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