summaryrefslogtreecommitdiff
path: root/sys
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
parente5856b32aab88d74036bed1037eb57a65a2c2814 (diff)
Use __func__ rather than the function name in log(9) calls to remove
some grep output noise.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/if_ether.c16
-rw-r--r--sys/netinet6/nd6.c25
2 files changed, 19 insertions, 22 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 4b9d5452357..e3d8c803a3f 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.159 2015/07/18 15:51:16 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.160 2015/08/17 09:58:10 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -358,8 +358,8 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
}
if ((rt->rt_flags & RTF_LLINFO) == 0) {
- log(LOG_DEBUG, "arpresolve: %s: route contains no arp"
- " information\n", inet_ntop(AF_INET,
+ log(LOG_DEBUG, "%s: %s: route contains no arp"
+ " information\n", __func__, inet_ntop(AF_INET,
&satosin(rt_key(rt))->sin_addr, addr,
sizeof(addr)));
m_freem(m);
@@ -368,16 +368,16 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
la = (struct llinfo_arp *)rt->rt_llinfo;
if (la == NULL)
- log(LOG_DEBUG, "arpresolve: %s: route without link "
- "local address\n", inet_ntop(AF_INET,
+ log(LOG_DEBUG, "%s: %s: route without link "
+ "local address\n", __func__, inet_ntop(AF_INET,
&satosin(dst)->sin_addr, addr, sizeof(addr)));
} else {
if ((la = arplookup(satosin(dst)->sin_addr.s_addr, 1, 0,
ifp->if_rdomain)) != NULL)
rt = la->la_rt;
else
- log(LOG_DEBUG,
- "arpresolve: %s: can't allocate llinfo\n",
+ log(LOG_DEBUG, "%s: %s: can't allocate llinfo\n",
+ __func__,
inet_ntop(AF_INET, &satosin(dst)->sin_addr,
addr, sizeof(addr)));
}
@@ -434,7 +434,7 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
#ifdef DIAGNOSTIC
if (rt->rt_expire == 0) {
/* This should never happen. (Should it? -gwr) */
- printf("arpresolve: unresolved and rt_expire == 0\n");
+ printf("%s: unresolved and rt_expire == 0\n", __func__);
/* Set expiration time to now (expired). */
rt->rt_expire = time_second;
}
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);
}