Eliminate some unneeded code bits.
This commit is contained in:
parent
570df2e4f2
commit
a2d3802cd8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151000
@ -67,7 +67,7 @@ vlan_status(int s)
|
|||||||
{
|
{
|
||||||
struct vlanreq vreq;
|
struct vlanreq vreq;
|
||||||
|
|
||||||
bzero((char *)&vreq, sizeof(struct vlanreq));
|
bzero((char *)&vreq, sizeof(vreq));
|
||||||
ifr.ifr_data = (caddr_t)&vreq;
|
ifr.ifr_data = (caddr_t)&vreq;
|
||||||
|
|
||||||
if (ioctl(s, SIOCGETVLAN, (caddr_t)&ifr) == -1)
|
if (ioctl(s, SIOCGETVLAN, (caddr_t)&ifr) == -1)
|
||||||
@ -76,8 +76,6 @@ vlan_status(int s)
|
|||||||
printf("\tvlan: %d parent interface: %s\n",
|
printf("\tvlan: %d parent interface: %s\n",
|
||||||
vreq.vlr_tag, vreq.vlr_parent[0] == '\0' ?
|
vreq.vlr_tag, vreq.vlr_parent[0] == '\0' ?
|
||||||
"<none>" : vreq.vlr_parent);
|
"<none>" : vreq.vlr_parent);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -108,20 +106,19 @@ setvlandev(const char *val, int d, int s, const struct afswtch *afp)
|
|||||||
static void
|
static void
|
||||||
unsetvlandev(const char *val, int d, int s, const struct afswtch *afp)
|
unsetvlandev(const char *val, int d, int s, const struct afswtch *afp)
|
||||||
{
|
{
|
||||||
struct vlanreq vreq;
|
|
||||||
|
|
||||||
if (val != NULL)
|
if (val != NULL)
|
||||||
warnx("argument to -vlandev is useless and hence deprecated");
|
warnx("argument to -vlandev is useless and hence deprecated");
|
||||||
|
|
||||||
bzero((char *)&vreq, sizeof(struct vlanreq));
|
bzero((char *)&__vreq, sizeof(__vreq));
|
||||||
ifr.ifr_data = (caddr_t)&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)
|
if (ioctl(s, SIOCGETVLAN, (caddr_t)&ifr) == -1)
|
||||||
err(1, "SIOCGETVLAN");
|
err(1, "SIOCGETVLAN");
|
||||||
|
|
||||||
bzero((char *)&vreq.vlr_parent, sizeof(vreq.vlr_parent));
|
bzero((char *)&__vreq.vlr_parent, sizeof(__vreq.vlr_parent));
|
||||||
vreq.vlr_tag = 0; /* XXX clear parent only (no kernel support now) */
|
__vreq.vlr_tag = 0; /* XXX clear parent only (no kernel support now) */
|
||||||
|
#endif
|
||||||
if (ioctl(s, SIOCSETVLAN, (caddr_t)&ifr) == -1)
|
if (ioctl(s, SIOCSETVLAN, (caddr_t)&ifr) == -1)
|
||||||
err(1, "SIOCSETVLAN");
|
err(1, "SIOCSETVLAN");
|
||||||
__have_dev = __have_tag = 0;
|
__have_dev = __have_tag = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user