Source-Changes-HG archive

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

[src/trunk]: src/sys/net Don't use aprint_* functions for logging unrelated t...



details:   https://anonhg.NetBSD.org/src/rev/7336372e101f
branches:  trunk
changeset: 991392:7336372e101f
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Jul 12 02:26:04 2018 +0000

description:
Don't use aprint_* functions for logging unrelated to autoconf(9)

diffstat:

 sys/net/if_llatbl.h |   7 ++++---
 sys/net/route.c     |  24 ++++++++++++------------
 2 files changed, 16 insertions(+), 15 deletions(-)

diffs (91 lines):

diff -r 33b57b903b2d -r 7336372e101f sys/net/if_llatbl.h
--- a/sys/net/if_llatbl.h       Thu Jul 12 00:16:32 2018 +0000
+++ b/sys/net/if_llatbl.h       Thu Jul 12 02:26:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_llatbl.h,v 1.15 2018/04/19 21:20:43 christos Exp $  */
+/*     $NetBSD: if_llatbl.h,v 1.16 2018/07/12 02:26:04 ozaki-r Exp $   */
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -37,6 +37,7 @@
 #endif
 
 #include <sys/rwlock.h>
+#include <sys/syslog.h>
 
 #include <netinet/in.h>
 
@@ -106,7 +107,7 @@
 
 
 #if 0
-#define LLE_LOCK_TRACE(t, lle) aprint_normal( \
+#define LLE_LOCK_TRACE(t, lle) log(LOG_DEBUG, \
                                    "%s:%d: LOCK(" #t "): lle=%p\n", \
                                    __func__, __LINE__, (lle))
 #else
@@ -142,7 +143,7 @@
 #define LLE_IS_VALID(lle)      (((lle) != NULL) && ((lle) != (void *)-1))
 
 #if 0
-#define LLE_REF_TRACE(t, n)    aprint_normal("%s:%d: REF(" #t "): refcnt=%d\n", \
+#define LLE_REF_TRACE(t, n)    log(LOG_DEBUG, "%s:%d: REF(" #t "): refcnt=%d\n", \
                                    __func__, __LINE__, (n))
 #else
 #define LLE_REF_TRACE(t, n)    do {} while (0)
diff -r 33b57b903b2d -r 7336372e101f sys/net/route.c
--- a/sys/net/route.c   Thu Jul 12 00:16:32 2018 +0000
+++ b/sys/net/route.c   Thu Jul 12 02:26:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.210 2018/06/01 07:13:35 ozaki-r Exp $      */
+/*     $NetBSD: route.c,v 1.211 2018/07/12 02:26:04 ozaki-r Exp $      */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.210 2018/06/01 07:13:35 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.211 2018/07/12 02:26:04 ozaki-r Exp $");
 
 #include <sys/param.h>
 #ifdef RTFLUSH_DEBUG
@@ -509,27 +509,27 @@
 {
        char buf[512];
 
-       aprint_normal("rt: ");
-       aprint_normal("p=%p ", rt);
+       log(LOG_DEBUG, "rt: ");
+       log(LOG_DEBUG, "p=%p ", rt);
        if (rt->_rt_key == NULL) {
-               aprint_normal("dst=(NULL) ");
+               log(LOG_DEBUG, "dst=(NULL) ");
        } else {
                sockaddr_format(rt->_rt_key, buf, sizeof(buf));
-               aprint_normal("dst=%s ", buf);
+               log(LOG_DEBUG, "dst=%s ", buf);
        }
        if (rt->rt_gateway == NULL) {
-               aprint_normal("gw=(NULL) ");
+               log(LOG_DEBUG, "gw=(NULL) ");
        } else {
                sockaddr_format(rt->_rt_key, buf, sizeof(buf));
-               aprint_normal("gw=%s ", buf);
+               log(LOG_DEBUG, "gw=%s ", buf);
        }
-       aprint_normal("flags=%x ", rt->rt_flags);
+       log(LOG_DEBUG, "flags=%x ", rt->rt_flags);
        if (rt->rt_ifp == NULL) {
-               aprint_normal("if=(NULL) ");
+               log(LOG_DEBUG, "if=(NULL) ");
        } else {
-               aprint_normal("if=%s ", rt->rt_ifp->if_xname);
+               log(LOG_DEBUG, "if=%s ", rt->rt_ifp->if_xname);
        }
-       aprint_normal("\n");
+       log(LOG_DEBUG, "\n");
 }
 #endif /* RT_DEBUG */
 



Home | Main Index | Thread Index | Old Index