Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Show __func__ instead of __FILE__ in debug log ...
details: https://anonhg.NetBSD.org/src/rev/2e011f49ec84
branches: trunk
changeset: 353636:2e011f49ec84
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon May 15 09:55:29 2017 +0000
description:
Show __func__ instead of __FILE__ in debug log messages
__func__ is shorter and more useful than __FILE__.
diffstat:
sys/netipsec/ipsec.c | 6 +++---
sys/netipsec/key.c | 10 +++++-----
sys/netipsec/key.h | 16 ++++++++--------
3 files changed, 16 insertions(+), 16 deletions(-)
diffs (110 lines):
diff -r 5308af1875c6 -r 2e011f49ec84 sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c Mon May 15 09:52:05 2017 +0000
+++ b/sys/netipsec/ipsec.c Mon May 15 09:55:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.88 2017/05/11 05:55:14 ryo Exp $ */
+/* $NetBSD: ipsec.c,v 1.89 2017/05/15 09:55:29 ozaki-r Exp $ */
/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */
/* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.88 2017/05/11 05:55:14 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.89 2017/05/15 09:55:29 ozaki-r Exp $");
/*
* IPsec controller part.
@@ -399,7 +399,7 @@
return sp;
}
#define KEY_ALLOCSP_DEFAULT(af) \
- key_allocsp_default((af),__FILE__, __LINE__)
+ key_allocsp_default((af), __func__, __LINE__)
/*
* For OUTBOUND packet having a socket. Searching SPD for packet,
diff -r 5308af1875c6 -r 2e011f49ec84 sys/netipsec/key.c
--- a/sys/netipsec/key.c Mon May 15 09:52:05 2017 +0000
+++ b/sys/netipsec/key.c Mon May 15 09:55:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.124 2017/05/15 09:52:05 ozaki-r Exp $ */
+/* $NetBSD: key.c,v 1.125 2017/05/15 09:55:29 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.124 2017/05/15 09:52:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.125 2017/05/15 09:55:29 ozaki-r Exp $");
/*
* This code is referd to RFC 2367
@@ -340,12 +340,12 @@
do { \
((p) = malloc((unsigned long)(n), M_SECA, M_NOWAIT)); \
printf("%s %d: %p <- KMALLOC(%s, %d)\n", \
- __FILE__, __LINE__, (p), #t, n); \
+ __func__, __LINE__, (p), #t, n); \
} while (0)
#define KFREE(p) \
do { \
- printf("%s %d: %p -> KFREE()\n", __FILE__, __LINE__, (p)); \
+ printf("%s %d: %p -> KFREE()\n", __func__, __LINE__, (p)); \
free((p), M_SECA); \
} while (0)
#endif
@@ -421,7 +421,7 @@
const struct sadb_msghdr *, struct secashead *, int *,
const char*, int);
#define KEY_NEWSAV(m, sadb, sah, e) \
- key_newsav(m, sadb, sah, e, __FILE__, __LINE__)
+ key_newsav(m, sadb, sah, e, __func__, __LINE__)
static void key_delsav (struct secasvar *);
static struct secashead *key_getsah (const struct secasindex *);
static struct secasvar *key_checkspidup (const struct secasindex *, u_int32_t);
diff -r 5308af1875c6 -r 2e011f49ec84 sys/netipsec/key.h
--- a/sys/netipsec/key.h Mon May 15 09:52:05 2017 +0000
+++ b/sys/netipsec/key.h Mon May 15 09:55:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.h,v 1.14 2015/03/30 03:51:50 ozaki-r Exp $ */
+/* $NetBSD: key.h,v 1.15 2017/05/15 09:55:29 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
/* $KAME: key.h,v 1.21 2001/07/27 03:51:30 itojun Exp $ */
@@ -67,24 +67,24 @@
* key_checkrequest were redone.
*/
#define KEY_ALLOCSP(spidx, dir) \
- key_allocsp(spidx, dir, __FILE__, __LINE__)
+ key_allocsp(spidx, dir, __func__, __LINE__)
#define KEY_ALLOCSP2(spi, dst, proto, dir) \
- key_allocsp2(spi, dst, proto, dir, __FILE__, __LINE__)
+ key_allocsp2(spi, dst, proto, dir, __func__, __LINE__)
#define KEY_NEWSP() \
- key_newsp(__FILE__, __LINE__)
+ key_newsp(__func__, __LINE__)
#define KEY_GETTUNNEL(osrc, odst, isrc, idst) \
- key_gettunnel(osrc, odst, isrc, idst, __FILE__, __LINE__)
+ key_gettunnel(osrc, odst, isrc, idst, __func__, __LINE__)
#define KEY_FREESP(spp) \
- _key_freesp(spp, __FILE__, __LINE__)
+ _key_freesp(spp, __func__, __LINE__)
struct secasvar *key_allocsa(const union sockaddr_union *,
u_int, u_int32_t, u_int16_t, u_int16_t, const char*, int);
void key_freesav(struct secasvar **, const char*, int);
#define KEY_ALLOCSA(dst, proto, spi, sport, dport) \
- key_allocsa(dst, proto, spi, sport, dport, __FILE__, __LINE__)
+ key_allocsa(dst, proto, spi, sport, dport, __func__, __LINE__)
#define KEY_FREESAV(psav) \
- key_freesav(psav, __FILE__, __LINE__)
+ key_freesav(psav, __func__, __LINE__)
void key_freeso (struct socket *);
int key_checktunnelsanity (struct secasvar *, u_int, void *, void *);
Home |
Main Index |
Thread Index |
Old Index