summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig/ifvlan.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2005-10-06 15:05:55 +0000
committeryar <yar@FreeBSD.org>2005-10-06 15:05:55 +0000
commita6cc05cfd1542bb7b2c631e44e266ef52c0f083a (patch)
tree45d96e5797571477b48bb66df0ed40dbbfb707c6 /sbin/ifconfig/ifvlan.c
parent5770eb4200f7996e417606793ee507a49b4249cf (diff)
downloadFreeBSD-src-a6cc05cfd1542bb7b2c631e44e266ef52c0f083a.zip
FreeBSD-src-a6cc05cfd1542bb7b2c631e44e266ef52c0f083a.tar.gz
Eliminate some unneeded code bits.
Diffstat (limited to 'sbin/ifconfig/ifvlan.c')
-rw-r--r--sbin/ifconfig/ifvlan.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c
index 7b85003..8ec39e2 100644
--- a/sbin/ifconfig/ifvlan.c
+++ b/sbin/ifconfig/ifvlan.c
@@ -67,7 +67,7 @@ vlan_status(int s)
{
struct vlanreq vreq;
- bzero((char *)&vreq, sizeof(struct vlanreq));
+ bzero((char *)&vreq, sizeof(vreq));
ifr.ifr_data = (caddr_t)&vreq;
if (ioctl(s, SIOCGETVLAN, (caddr_t)&ifr) == -1)
@@ -76,8 +76,6 @@ vlan_status(int s)
printf("\tvlan: %d parent interface: %s\n",
vreq.vlr_tag, vreq.vlr_parent[0] == '\0' ?
"<none>" : vreq.vlr_parent);
-
- return;
}
static void
@@ -108,20 +106,19 @@ setvlandev(const char *val, int d, int s, const struct afswtch *afp)
static void
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;
-
+ bzero((char *)&__vreq, sizeof(__vreq));
+ ifr.ifr_data = (caddr_t)&__vreq;
+#if 0 /* this code will be of use when we can alter vlan or vlandev only */
if (ioctl(s, SIOCGETVLAN, (caddr_t)&ifr) == -1)
err(1, "SIOCGETVLAN");
- bzero((char *)&vreq.vlr_parent, sizeof(vreq.vlr_parent));
- vreq.vlr_tag = 0; /* XXX clear parent only (no kernel support now) */
-
+ bzero((char *)&__vreq.vlr_parent, sizeof(__vreq.vlr_parent));
+ __vreq.vlr_tag = 0; /* XXX clear parent only (no kernel support now) */
+#endif
if (ioctl(s, SIOCSETVLAN, (caddr_t)&ifr) == -1)
err(1, "SIOCSETVLAN");
__have_dev = __have_tag = 0;
OpenPOWER on IntegriCloud