Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys where appropriate rename xxx_ioctl() struct mbuf * param...



details:   https://anonhg.NetBSD.org/src/rev/62a6db674608
branches:  trunk
changeset: 330121:62a6db674608
user:      rtr <rtr%NetBSD.org@localhost>
date:      Mon Jun 23 17:18:45 2014 +0000

description:
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@

diffstat:

 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(-)

diffs (271 lines):

diff -r 16def97e04a0 -r 62a6db674608 sys/kern/sys_socket.c
--- a/sys/kern/sys_socket.c     Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/kern/sys_socket.c     Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/systm.h>
@@ -202,8 +202,8 @@
                        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 -r 16def97e04a0 -r 62a6db674608 sys/net/link_proto.c
--- a/sys/net/link_proto.c      Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/net/link_proto.c      Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/socket.h>
@@ -51,7 +51,7 @@
 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 @@
 
 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 -r 16def97e04a0 -r 62a6db674608 sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/netatalk/ddp_usrreq.c Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 -r 16def97e04a0 -r 62a6db674608 sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c      Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/netinet/raw_ip.c      Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 -r 16def97e04a0 -r 62a6db674608 sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/netinet/tcp_usrreq.c  Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 -r 16def97e04a0 -r 62a6db674608 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c  Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/netinet/udp_usrreq.c  Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 -r 16def97e04a0 -r 62a6db674608 sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c    Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/netinet6/raw_ip6.c    Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 -r 16def97e04a0 -r 62a6db674608 sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c        Mon Jun 23 17:18:43 2014 +0000
+++ b/sys/netinet6/udp6_usrreq.c        Mon Jun 23 17:18:45 2014 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
 
 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 @@
         *  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



Home | Main Index | Thread Index | Old Index