summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_debugprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/raidframe/rf_debugprint.c')
-rw-r--r--sys/dev/raidframe/rf_debugprint.c58
1 files changed, 2 insertions, 56 deletions
diff --git a/sys/dev/raidframe/rf_debugprint.c b/sys/dev/raidframe/rf_debugprint.c
index 470b838edd7..ad64fdb8fd2 100644
--- a/sys/dev/raidframe/rf_debugprint.c
+++ b/sys/dev/raidframe/rf_debugprint.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_debugprint.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */
+/* $NetBSD: rf_debugprint.c,v 1.2 1999/01/26 02:33:54 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,47 +33,6 @@
* printfs, and to capture only the printf's immediately preceding a failure.
*/
-/* :
- * Log: rf_debugprint.c,v
- * Revision 1.13 1996/08/07 21:08:31 jimz
- * remove bogus ; from mutex decl
- *
- * Revision 1.12 1996/06/10 11:55:47 jimz
- * Straightened out some per-array/not-per-array distinctions, fixed
- * a couple bugs related to confusion. Added shutdown lists. Removed
- * layout shutdown function (now subsumed by shutdown lists).
- *
- * Revision 1.11 1996/06/05 18:06:02 jimz
- * Major code cleanup. The Great Renaming is now done.
- * Better modularity. Better typing. Fixed a bunch of
- * synchronization bugs. Made a lot of global stuff
- * per-desc or per-array. Removed dead code.
- *
- * Revision 1.10 1996/05/30 23:22:16 jimz
- * bugfixes of serialization, timing problems
- * more cleanup
- *
- * Revision 1.9 1996/05/27 18:56:37 jimz
- * more code cleanup
- * better typing
- * compiles in all 3 environments
- *
- * Revision 1.8 1996/05/23 00:33:23 jimz
- * code cleanup: move all debug decls to rf_options.c, all extern
- * debug decls to rf_options.h, all debug vars preceded by rf_
- *
- * Revision 1.7 1996/05/20 16:16:06 jimz
- * switch to rf_{mutex,cond}_{init,destroy}
- *
- * Revision 1.6 1996/05/18 19:51:34 jimz
- * major code cleanup- fix syntax, make some types consistent,
- * add prototypes, clean out dead code, et cetera
- *
- * Revision 1.5 1995/12/01 16:00:45 root
- * added copyright info
- *
- */
-
#include "rf_types.h"
#include "rf_threadstuff.h"
#include "rf_debugprint.h"
@@ -157,29 +116,16 @@ void rf_spill_debug_buffer(fname)
char *fname;
{
int i;
-#ifndef KERNEL
- FILE *fp;
-#endif /* !KERNEL */
if (!rf_debugPrintUseBuffer)
return;
RF_LOCK_MUTEX(rf_debug_print_mutex);
-#ifndef KERNEL
- fp = (fname) ? fopen(fname,"w") : stdout;
- if (!fp) {printf("Unable to open file %s for writing\n",fname); return;}
- for (i=rf_debugprint_index+1; i != rf_debugprint_index; i = (i+1)&BUFMASK) if (rf_debugprint_buf[i].cstring)
- fprintf(fp,rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3,
- rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8);
- fprintf(fp,rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3,
- rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8);
- fclose(fp);
-#else /* !KERNEL */
+
for (i=rf_debugprint_index+1; i != rf_debugprint_index; i = (i+1)&BUFMASK) if (rf_debugprint_buf[i].cstring)
printf(rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3,
rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8);
printf(rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3,
rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8);
-#endif /* !KERNEL */
RF_UNLOCK_MUTEX(rf_debug_print_mutex);
}