From ef2a6ab86593fc782fc03ae43447ece753d65f36 Mon Sep 17 00:00:00 2001 From: rjs Date: Wed, 6 Jun 2007 17:08:27 +0000 Subject: [PATCH] Wrap ktrace calls with #ifdef KTRACE. --- sys/compat/linux/common/linux_socket.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c index 2f71e6f37245..e3e854a72552 100644 --- a/sys/compat/linux/common/linux_socket.c +++ b/sys/compat/linux/common/linux_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.74 2007/06/02 13:16:19 yamt Exp $ */ +/* $NetBSD: linux_socket.c,v 1.75 2007/06/06 17:08:27 rjs Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.74 2007/06/02 13:16:19 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.75 2007/06/06 17:08:27 rjs Exp $"); #if defined(_KERNEL_OPT) #include "opt_ktrace.h" @@ -1429,8 +1429,10 @@ linux_get_sa(struct lwp *l, int s, struct mbuf **mp, const struct osockaddr *osa error, osa, salen)); goto bad; } +#ifdef KTRACE if (KTRPOINT(l->l_proc, KTR_USER)) ktrkuser(l, "linux sockaddr", kosa, salen); +#endif bdom = linux_to_bsd_domain(kosa->sa_family); if (bdom == -1) { @@ -1497,8 +1499,10 @@ linux_get_sa(struct lwp *l, int s, struct mbuf **mp, const struct osockaddr *osa sa->sa_family = bdom; sa->sa_len = salen; m->m_len = salen; +#ifdef KTRACE if (KTRPOINT(l->l_proc, KTR_USER)) ktrkuser(l, "new sockaddr", kosa, salen); +#endif #ifdef DEBUG_LINUX DPRINTF(("family %d, len = %d [ ", sa->sa_family, sa->sa_len));