From 20f923718e5cb999ec18a7d49ff6dd0f422ad97d Mon Sep 17 00:00:00 2001 From: jonathan Date: Mon, 24 May 2004 19:08:07 +0000 Subject: [PATCH] Change DIAGNOSTIC warning in nfs_send() about NULL rep->r_procp: the warning is triggered pervasively, so print it only once per boot. (The callers who pass NULL r_procps should soon be fixed to pass a valid struct proc* ). --- sys/nfs/nfs_socket.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 55a3b0541ac5..7586e0915ec3 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.106 2004/05/23 08:08:48 yamt Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.107 2004/05/24 19:08:07 jonathan Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.106 2004/05/23 08:08:48 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.107 2004/05/24 19:08:07 jonathan Exp $"); #include "fs_nfs.h" #include "opt_nfs.h" @@ -443,9 +443,14 @@ nfs_send(so, nam, top, rep, p) /* XXX nfs_doio()/nfs_request() calls with rep->r_procp == NULL */ if (p == NULL && rep->r_procp == NULL) { #ifdef DIAGNOSTIC - printf("nfs_send: proc botch: rep %p arg %p curproc %p\n", - rep->r_procp, p, curproc ); -#endif + static int warned = 0; + if (!warned) { + printf("nfs_send: proc botch: " + "rep %p arg %p curproc %p\n", + rep->r_procp, p, curproc); + warned = 1; + } +#endif /* DIAGNOSTIC */ p = curproc; }