From c5cb34938647c1e1c6f5a9388436d9c2395026f8 Mon Sep 17 00:00:00 2001 From: rtr Date: Mon, 23 Jun 2014 17:18:45 +0000 Subject: [PATCH] where appropriate rename xxx_ioctl() struct mbuf * parameters from `control' to `ifp' after split from xxx_usrreq(). sys_socket.c fix wrapping of arguments to be consistent with other function calls in the file after replacing pr_usrreq() call with pr_ioctl() which required one less argument. link_proto.c fix indentation of parameters in link_ioctl() prototype to be consistent with the rest of the file. discussed with rmind@ --- sys/kern/sys_socket.c | 8 ++++---- sys/net/link_proto.c | 10 +++++----- sys/netatalk/ddp_usrreq.c | 10 +++++----- sys/netinet/raw_ip.c | 8 ++++---- sys/netinet/tcp_usrreq.c | 14 +++++++------- sys/netinet/udp_usrreq.c | 8 ++++---- sys/netinet6/raw_ip6.c | 8 ++++---- sys/netinet6/udp6_usrreq.c | 8 ++++---- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index a92b2ecdf760..1eba2428f045 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: sys_socket.c,v 1.69 2014/06/22 08:10:18 rtr Exp $ */ +/* $NetBSD: sys_socket.c,v 1.70 2014/06/23 17:18:45 rtr Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_socket.c,v 1.69 2014/06/22 08:10:18 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_socket.c,v 1.70 2014/06/23 17:18:45 rtr Exp $"); #include #include @@ -202,8 +202,8 @@ soo_ioctl(file_t *fp, u_long cmd, void *data) error = ifioctl(so, cmd, data, curlwp); else { error = (*so->so_proto->pr_usrreqs->pr_ioctl)(so, - (struct mbuf *)cmd, - (struct mbuf *)data, NULL, curlwp); + (struct mbuf *)cmd, (struct mbuf *)data, + NULL, curlwp); } KERNEL_UNLOCK_ONE(NULL); break; diff --git a/sys/net/link_proto.c b/sys/net/link_proto.c index c01001d744a6..82c2cfa21c37 100644 --- a/sys/net/link_proto.c +++ b/sys/net/link_proto.c @@ -1,4 +1,4 @@ -/* $NetBSD: link_proto.c,v 1.10 2014/06/22 08:10:18 rtr Exp $ */ +/* $NetBSD: link_proto.c,v 1.11 2014/06/23 17:18:45 rtr Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.10 2014/06/22 08:10:18 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.11 2014/06/23 17:18:45 rtr Exp $"); #include #include @@ -51,7 +51,7 @@ static int sockaddr_dl_cmp(const struct sockaddr *, const struct sockaddr *); static int link_attach(struct socket *, int); static void link_detach(struct socket *); static int link_ioctl(struct socket *, struct mbuf *, struct mbuf *, - struct mbuf *, struct lwp *); + struct mbuf *, struct lwp *); static int link_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *); static void link_init(void); @@ -234,10 +234,10 @@ link_detach(struct socket *so) static int link_ioctl(struct socket *so, struct mbuf *m, struct mbuf *nam, - struct mbuf *control, struct lwp *l) + struct mbuf *ifp, struct lwp *l) { return link_control(so, (unsigned long)m, nam, - (struct ifnet *)control, l); + (struct ifnet *)ifp, l); } static int diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index 4edda98791b1..473ba8d72e3d 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: ddp_usrreq.c,v 1.45 2014/06/22 08:10:18 rtr Exp $ */ +/* $NetBSD: ddp_usrreq.c,v 1.46 2014/06/23 17:18:45 rtr Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.45 2014/06/22 08:10:18 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.46 2014/06/23 17:18:45 rtr Exp $"); #include "opt_mbuftrace.h" @@ -480,10 +480,10 @@ ddp_detach(struct socket *so) static int ddp_ioctl(struct socket *so, struct mbuf *m, struct mbuf *addr, - struct mbuf *rights, struct lwp *l) + struct mbuf *ifp, struct lwp *l) { - return (at_control((long) m, (void *) addr, - (struct ifnet *) rights, l)); + return at_control((long) m, (void *) addr, + (struct ifnet *) ifp, l); } /* diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 767359be7dc5..e1a6f9e67e94 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.125 2014/06/22 08:10:18 rtr Exp $ */ +/* $NetBSD: raw_ip.c,v 1.126 2014/06/23 17:18:45 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.125 2014/06/22 08:10:18 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.126 2014/06/23 17:18:45 rtr Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -568,9 +568,9 @@ rip_detach(struct socket *so) static int rip_ioctl(struct socket *so, struct mbuf *m, struct mbuf *nam, - struct mbuf *control, struct lwp *l) + struct mbuf *ifp, struct lwp *l) { - return in_control(so, (long)m, nam, (ifnet_t *)control, l); + return in_control(so, (long)m, nam, (ifnet_t *)ifp, l); } int diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index edd05258cd95..66cefe28415b 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_usrreq.c,v 1.178 2014/06/22 08:10:18 rtr Exp $ */ +/* $NetBSD: tcp_usrreq.c,v 1.179 2014/06/23 17:18:45 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.178 2014/06/22 08:10:18 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.179 2014/06/23 17:18:45 rtr Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -944,18 +944,18 @@ tcp_detach(struct socket *so) static int tcp_ioctl(struct socket *so, struct mbuf *m, struct mbuf *nam, - struct mbuf *control, struct lwp *l) + struct mbuf *ifp, struct lwp *l) { switch (so->so_proto->pr_domain->dom_family) { #ifdef INET case PF_INET: - return (in_control(so, (long)m, (void *)nam, - (struct ifnet *)control, l)); + return in_control(so, (long)m, (void *)nam, + (struct ifnet *)ifp, l); #endif #ifdef INET6 case PF_INET6: - return (in6_control(so, (long)m, (void *)nam, - (struct ifnet *)control, l)); + return in6_control(so, (long)m, (void *)nam, + (struct ifnet *)ifp, l); #endif default: return EAFNOSUPPORT; diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 50176be8e3a6..7c8bef05611e 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.200 2014/06/22 08:10:18 rtr Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.201 2014/06/23 17:18:45 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.200 2014/06/22 08:10:18 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.201 2014/06/23 17:18:45 rtr Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -896,10 +896,10 @@ udp_detach(struct socket *so) static int udp_ioctl(struct socket *so, struct mbuf *m, struct mbuf *nam, - struct mbuf *control, struct lwp *l) + struct mbuf *ifp, struct lwp *l) { return in_control(so, (long)m, (void *)nam, - (struct ifnet *)control, l); + (struct ifnet *)ifp, l); } static int diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index e951e3ebecb5..ec6864d20941 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.119 2014/06/22 08:10:19 rtr Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.120 2014/06/23 17:18:45 rtr Exp $ */ /* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.119 2014/06/22 08:10:19 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.120 2014/06/23 17:18:45 rtr Exp $"); #include "opt_ipsec.h" @@ -646,10 +646,10 @@ rip6_detach(struct socket *so) static int rip6_ioctl(struct socket *so, struct mbuf *m, - struct mbuf *nam, struct mbuf *control, struct lwp *l) + struct mbuf *nam, struct mbuf *ifp, struct lwp *l) { return in6_control(so, (u_long)m, (void *)nam, - (struct ifnet *)control, l); + (struct ifnet *)ifp, l); } int diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index f99574329e8a..4f7dc89acec9 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_usrreq.c,v 1.99 2014/06/22 08:10:19 rtr Exp $ */ +/* $NetBSD: udp6_usrreq.c,v 1.100 2014/06/23 17:18:45 rtr Exp $ */ /* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.99 2014/06/22 08:10:19 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.100 2014/06/23 17:18:45 rtr Exp $"); #include "opt_inet.h" #include "opt_inet_csum.h" @@ -679,7 +679,7 @@ udp6_detach(struct socket *so) static int udp6_ioctl(struct socket *so, struct mbuf *m, struct mbuf *addr6, - struct mbuf *control, struct lwp *l) + struct mbuf *ifp, struct lwp *l) { /* * MAPPED_ADDR implementation info: @@ -692,7 +692,7 @@ udp6_ioctl(struct socket *so, struct mbuf *m, struct mbuf *addr6, * and AF_INET6 socket for AF_INET6 addrs. */ return in6_control(so, (u_long)m, (void *)addr6, - (struct ifnet *)control, l); + (struct ifnet *)ifp, l); } int