aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifvlan.c
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2005-09-29 23:38:24 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2005-09-29 23:38:24 +0000
commitb0dcc11c4385b69a2dcf341c0dc0fa8b9c19ebc1 (patch)
treeb1c86251140a79ee00f198b32ba63d118124d951 /sbin/ifconfig/ifvlan.c
parentf3b509206168f1038b07c4c6aaada50ee68aaf4e (diff)
downloadsrc-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/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 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),