Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Change DIAGNOSTIC warning in nfs_send() about NULL r...
details: https://anonhg.NetBSD.org/src/rev/0c8de17063ba
branches: trunk
changeset: 566923:0c8de17063ba
user: jonathan <jonathan%NetBSD.org@localhost>
date: Mon May 24 19:08:07 2004 +0000
description:
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* ).
diffstat:
sys/nfs/nfs_socket.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 8af644ecc214 -r 0c8de17063ba sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Mon May 24 19:02:19 2004 +0000
+++ b/sys/nfs/nfs_socket.c Mon May 24 19:08:07 2004 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
/* 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;
}
Home |
Main Index |
Thread Index |
Old Index