svn commit: r319505 - in head/sys: kern sys
Gleb Smirnoff
glebius at FreeBSD.org
Fri Jun 2 17:49:23 UTC 2017
Author: glebius
Date: Fri Jun 2 17:49:21 2017
New Revision: 319505
URL: https://svnweb.freebsd.org/changeset/base/319505
Log:
Rename accept filter getopt/setopt functions, so that they are prefixed
with module name and match other functions in the module. There is no
functional change.
Modified:
head/sys/kern/uipc_accf.c
head/sys/kern/uipc_socket.c
head/sys/sys/sockopt.h
Modified: head/sys/kern/uipc_accf.c
==============================================================================
--- head/sys/kern/uipc_accf.c Fri Jun 2 17:43:47 2017 (r319504)
+++ head/sys/kern/uipc_accf.c Fri Jun 2 17:49:21 2017 (r319505)
@@ -161,7 +161,7 @@ accept_filt_generic_mod_event(module_t mod, int event,
}
int
-do_getopt_accept_filter(struct socket *so, struct sockopt *sopt)
+accept_filt_getopt(struct socket *so, struct sockopt *sopt)
{
struct accept_filter_arg *afap;
int error;
@@ -189,7 +189,7 @@ out:
}
int
-do_setopt_accept_filter(struct socket *so, struct sockopt *sopt)
+accept_filt_setopt(struct socket *so, struct sockopt *sopt)
{
struct accept_filter_arg *afap;
struct accept_filter *afp;
Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c Fri Jun 2 17:43:47 2017 (r319504)
+++ head/sys/kern/uipc_socket.c Fri Jun 2 17:49:21 2017 (r319505)
@@ -452,7 +452,7 @@ sodealloc(struct socket *so)
&so->so_snd.sb_hiwat, 0, RLIM_INFINITY);
/* remove accept filter if one is present. */
if (so->so_accf != NULL)
- do_setopt_accept_filter(so, NULL);
+ accept_filt_setopt(so, NULL);
#ifdef MAC
mac_socket_destroy(so);
#endif
@@ -2526,7 +2526,7 @@ sosetopt(struct socket *so, struct sockopt *sopt)
} else {
switch (sopt->sopt_name) {
case SO_ACCEPTFILTER:
- error = do_setopt_accept_filter(so, sopt);
+ error = accept_filt_setopt(so, sopt);
if (error)
goto bad;
break;
@@ -2784,7 +2784,7 @@ sogetopt(struct socket *so, struct sockopt *sopt)
} else {
switch (sopt->sopt_name) {
case SO_ACCEPTFILTER:
- error = do_getopt_accept_filter(so, sopt);
+ error = accept_filt_getopt(so, sopt);
break;
case SO_LINGER:
Modified: head/sys/sys/sockopt.h
==============================================================================
--- head/sys/sys/sockopt.h Fri Jun 2 17:43:47 2017 (r319504)
+++ head/sys/sys/sockopt.h Fri Jun 2 17:49:21 2017 (r319505)
@@ -64,8 +64,8 @@ int sooptcopyout(struct sockopt *sopt, const void *buf
int soopt_getm(struct sockopt *sopt, struct mbuf **mp);
int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m);
int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m);
-int do_getopt_accept_filter(struct socket *so, struct sockopt *sopt);
-int do_setopt_accept_filter(struct socket *so, struct sockopt *sopt);
+int accept_filt_getopt(struct socket *, struct sockopt *);
+int accept_filt_setopt(struct socket *, struct sockopt *);
int so_setsockopt(struct socket *so, int level, int optname,
void *optval, size_t optlen);
More information about the svn-src-head
mailing list