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@
This commit is contained in:
rtr 2014-06-23 17:18:45 +00:00
parent 866279dbba
commit c5cb349386
8 changed files with 37 additions and 37 deletions

View File

@ -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 @@ 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;

View File

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

View File

@ -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 @@ 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);
}
/*

View File

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

View File

@ -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 @@ 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;

View File

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

View File

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

View File

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