Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[.joined/src/trunk]: .joined/src/sys sys: Use if_ioctl wrapper function.
details: https://anonhg.NetBSD.org/.joined/src/rev/0ecb11d420d5
branches: trunk
changeset: 359342:0ecb11d420d5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Dec 31 14:24:50 2021 +0000
description:
sys: Use if_ioctl wrapper function.
diffstat:
sys/altq/altq_afmap.c | 6 +++---
sys/net/if.c | 14 +++++++-------
sys/net/if_bridge.c | 6 +++---
sys/net/lagg/if_lagg_lacp.c | 6 +++---
sys/netcan/can.c | 6 +++---
5 files changed, 19 insertions(+), 19 deletions(-)
diffs (164 lines):
diff -r 3b19ab3572b9 -r 0ecb11d420d5 sys/altq/altq_afmap.c
--- a/sys/altq/altq_afmap.c Fri Dec 31 14:24:38 2021 +0000
+++ b/sys/altq/altq_afmap.c Fri Dec 31 14:24:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_afmap.c,v 1.21 2021/09/21 14:30:15 christos Exp $ */
+/* $NetBSD: altq_afmap.c,v 1.22 2021/12/31 14:24:50 riastradh Exp $ */
/* $KAME: altq_afmap.c,v 1.12 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_afmap.c,v 1.21 2021/09/21 14:30:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_afmap.c,v 1.22 2021/12/31 14:24:50 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -372,7 +372,7 @@
if (ifp == NULL || (ifp->if_flags & IFF_RUNNING) == 0)
error = ENXIO;
else
- error = ifp->if_ioctl(ifp, cmd, addr);
+ error = if_ioctl(ifp, cmd, addr);
return error;
}
diff -r 3b19ab3572b9 -r 0ecb11d420d5 sys/net/if.c
--- a/sys/net/if.c Fri Dec 31 14:24:38 2021 +0000
+++ b/sys/net/if.c Fri Dec 31 14:24:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.497 2021/12/31 14:24:26 riastradh Exp $ */
+/* $NetBSD: if.c,v 1.498 2021/12/31 14:24:50 riastradh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.497 2021/12/31 14:24:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.498 2021/12/31 14:24:50 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -3482,7 +3482,7 @@
KERNEL_LOCK_UNLESS_IFP_MPSAFE(ifp);
IFNET_LOCK(ifp);
- error = (*ifp->if_ioctl)(ifp, cmd, data);
+ error = if_ioctl(ifp, cmd, data);
if (error != ENOTTY)
;
else if (so->so_proto == NULL)
@@ -3781,8 +3781,8 @@
if (ifp->if_initaddr != NULL)
rc = (*ifp->if_initaddr)(ifp, ifa, src);
else if (src ||
- (rc = (*ifp->if_ioctl)(ifp, SIOCSIFDSTADDR, ifa)) == ENOTTY)
- rc = (*ifp->if_ioctl)(ifp, SIOCINITIFADDR, ifa);
+ (rc = if_ioctl(ifp, SIOCSIFDSTADDR, ifa)) == ENOTTY)
+ rc = if_ioctl(ifp, SIOCINITIFADDR, ifa);
return rc;
}
@@ -3849,7 +3849,7 @@
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_flags = flags & ~IFF_CANTCHANGE;
- rc = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, &ifr);
+ rc = if_ioctl(ifp, SIOCSIFFLAGS, &ifr);
if (rc != 0 && cantflags != 0)
ifp->if_flags ^= cantflags;
@@ -3870,7 +3870,7 @@
* directly rather than via doifoictl()
*/
ifreq_setaddr(cmd, &ifr, sa);
- rc = (*ifp->if_ioctl)(ifp, cmd, &ifr);
+ rc = if_ioctl(ifp, cmd, &ifr);
return rc;
}
diff -r 3b19ab3572b9 -r 0ecb11d420d5 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Fri Dec 31 14:24:38 2021 +0000
+++ b/sys/net/if_bridge.c Fri Dec 31 14:24:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.184 2021/12/31 14:24:38 riastradh Exp $ */
+/* $NetBSD: if_bridge.c,v 1.185 2021/12/31 14:24:50 riastradh Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.184 2021/12/31 14:24:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.185 2021/12/31 14:24:50 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -869,7 +869,7 @@
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_mtu = sc->sc_if.if_mtu;
IFNET_LOCK(ifs);
- error = ifs->if_ioctl(ifs, SIOCSIFMTU, &ifr);
+ error = if_ioctl(ifs, SIOCSIFMTU, &ifr);
IFNET_UNLOCK(ifs);
if (error != 0)
goto out;
diff -r 3b19ab3572b9 -r 0ecb11d420d5 sys/net/lagg/if_lagg_lacp.c
--- a/sys/net/lagg/if_lagg_lacp.c Fri Dec 31 14:24:38 2021 +0000
+++ b/sys/net/lagg/if_lagg_lacp.c Fri Dec 31 14:24:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lagg_lacp.c,v 1.9 2021/11/30 01:17:02 yamaguchi Exp $ */
+/* $NetBSD: if_lagg_lacp.c,v 1.10 2021/12/31 14:24:51 riastradh Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.9 2021/11/30 01:17:02 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.10 2021/12/31 14:24:51 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_lagg.h"
@@ -839,7 +839,7 @@
memset(&ifmr, 0, sizeof(ifmr));
ifmr.ifm_count = 0;
- error = ifp_port->if_ioctl(ifp_port, SIOCGIFMEDIA, (void *)&ifmr);
+ error = if_ioctl(ifp_port, SIOCGIFMEDIA, (void *)&ifmr);
if (error == 0) {
media = lacp_ifmedia2lacpmedia(ifmr.ifm_active);
} else if (error != ENOTTY){
diff -r 3b19ab3572b9 -r 0ecb11d420d5 sys/netcan/can.c
--- a/sys/netcan/can.c Fri Dec 31 14:24:38 2021 +0000
+++ b/sys/netcan/can.c Fri Dec 31 14:24:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: can.c,v 1.10 2021/09/21 15:04:27 christos Exp $ */
+/* $NetBSD: can.c,v 1.11 2021/12/31 14:24:51 riastradh Exp $ */
/*-
* Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.10 2021/09/21 15:04:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.11 2021/12/31 14:24:51 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -187,7 +187,7 @@
default:
if (ifp->if_ioctl == 0)
return (EOPNOTSUPP);
- return ((*ifp->if_ioctl)(ifp, cmd, data));
+ return (if_ioctl(ifp, cmd, data));
}
return (0);
}
Home |
Main Index |
Thread Index |
Old Index