summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-08-17 09:58:11 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-08-17 09:58:11 +0000
commit87a64952a2217bc2eb8b1ad0e7f229b96d9d5dfa (patch)
tree563462e03db79c6483feb553963a8f83eba23f7b /sys/netinet6/nd6.c
parente5856b32aab88d74036bed1037eb57a65a2c2814 (diff)
Use __func__ rather than the function name in log(9) calls to remove
some grep output noise.
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r--sys/netinet6/nd6.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 138909aa2f1..47ebfc69ef4 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.143 2015/07/16 15:31:35 mpi Exp $ */
+/* $OpenBSD: nd6.c,v 1.144 2015/08/17 09:58:10 mpi Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -122,7 +122,7 @@ nd6_init(void)
static int nd6_init_done = 0;
if (nd6_init_done) {
- log(LOG_NOTICE, "nd6_init called more than once(ignored)\n");
+ log(LOG_NOTICE, "%s called more than once\n", __func__);
return;
}
@@ -190,9 +190,8 @@ nd6_setmtu0(struct ifnet *ifp, struct nd_ifinfo *ndi)
* log to the case of changing the MTU, not initializing it.
*/
if (omaxmtu >= IPV6_MMTU && ndi->maxmtu < IPV6_MMTU) {
- log(LOG_NOTICE, "nd6_setmtu0: "
- "new link MTU on %s (%lu) is too small for IPv6\n",
- ifp->if_xname, (unsigned long)ndi->maxmtu);
+ log(LOG_NOTICE, "%s: link MTU on %s (%lu) too small for IPv6\n",
+ __func__, ifp->if_xname, (unsigned long)ndi->maxmtu);
}
}
@@ -676,9 +675,8 @@ nd6_lookup(struct in6_addr *addr6, int create, struct ifnet *ifp,
&rt, rtableid)) != 0) {
#if 0
char ip[INET6_ADDRSTRLEN];
- log(LOG_ERR,
- "nd6_lookup: failed to add route for a "
- "neighbor(%s), errno=%d\n",
+ log(LOG_ERR, "%s: failed to add route for a "
+ "neighbor(%s), errno=%d\n", __func__,
inet_ntop(AF_INET6, addr6, ip, sizeof(ip)),
e);
#endif
@@ -712,8 +710,8 @@ nd6_lookup(struct in6_addr *addr6, int create, struct ifnet *ifp,
(ifp && rt->rt_ifa->ifa_ifp != ifp)) {
if (create) {
char addr[INET6_ADDRSTRLEN];
- nd6log((LOG_DEBUG,
- "nd6_lookup: failed to lookup %s (if = %s)\n",
+ nd6log((LOG_DEBUG, "%s: failed to lookup %s (if=%s)\n",
+ __func__,
inet_ntop(AF_INET6, addr6, addr, sizeof(addr)),
ifp ? ifp->if_xname : "unspec"));
}
@@ -1625,9 +1623,8 @@ nd6_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr_in6 *dst,
!(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) {
char addr[INET6_ADDRSTRLEN];
- log(LOG_DEBUG,
- "nd6_output: can't allocate llinfo for %s "
- "(ln=%p, rt=%p)\n",
+ log(LOG_DEBUG, "%s: can't allocate llinfo for %s "
+ "(ln=%p, rt=%p)\n", __func__,
inet_ntop(AF_INET6, &dst->sin6_addr,
addr, sizeof(addr)),
ln, rt);
@@ -1758,7 +1755,7 @@ nd6_storelladdr(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
}
if (rt->rt_gateway->sa_family != AF_LINK) {
- printf("nd6_storelladdr: something odd happens\n");
+ printf("%s: something odd happens\n", __func__);
m_freem(m);
return (EINVAL);
}