Wrap ktrace calls with #ifdef KTRACE.
This commit is contained in:
parent
6ae0ffb7d9
commit
ef2a6ab865
@ -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 <sys/cdefs.h>
|
||||
__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));
|
||||
|
Loading…
Reference in New Issue
Block a user