diff options
| author | oster <oster@NetBSD.org> | 2002-09-14 17:53:57 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2002-09-14 17:53:57 +0000 |
| commit | a2b9142871be6607c6e2ba4783f9b265c09bcac6 (patch) | |
| tree | c4c170bbdda5640da4aceb0bfadd74b2fb26ee05 /sys/dev/raidframe | |
| parent | 954775e02cbfedd06104952e24f5943c8f8bc80a (diff) | |
Everyone and their dog was using RF_ERRORMSG3 to print out the same
sort of error message, over and over again, in different files.
Rather than having the same text repeated in multiple .o files,
create a couple of little functions to do the printing, and save a
bundle of space. Also improves readability of code.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_acctrace.c | 10 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_alloclist.c | 10 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_callback.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_dagutils.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_debugMem.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_diskqueue.c | 13 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_driver.c | 61 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_engine.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_general.h | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_map.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_mcpair.c | 13 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_paritylog.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_paritylogging.c | 31 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_psstatus.c | 10 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconmap.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 9 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconutil.c | 13 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_revent.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_stripelocks.c | 13 |
19 files changed, 117 insertions, 128 deletions
diff --git a/sys/dev/raidframe/rf_acctrace.c b/sys/dev/raidframe/rf_acctrace.c index b49b3d6c847..b421b0dee45 100644 --- a/sys/dev/raidframe/rf_acctrace.c +++ b/sys/dev/raidframe/rf_acctrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_acctrace.c,v 1.7 2001/11/13 07:11:12 lukem Exp $ */ +/* $NetBSD: rf_acctrace.c,v 1.8 2002/09/14 17:53:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_acctrace.c,v 1.7 2001/11/13 07:11:12 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_acctrace.c,v 1.8 2002/09/14 17:53:57 oster Exp $"); #include <sys/stat.h> #include <sys/types.h> @@ -86,13 +86,11 @@ rf_ConfigureAccessTrace(listp) numTracesSoFar = 0; rc = rf_mutex_init(&rf_tracing_mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); } rc = rf_ShutdownCreate(listp, rf_ShutdownAccessTrace, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); if (rf_accessTraceBufSize) { RF_Free(access_tracebuf, rf_accessTraceBufSize * sizeof(RF_AccTraceEntry_t)); rf_mutex_destroy(&rf_tracing_mutex); diff --git a/sys/dev/raidframe/rf_alloclist.c b/sys/dev/raidframe/rf_alloclist.c index 7c3493001b1..0b8fce4c0f5 100644 --- a/sys/dev/raidframe/rf_alloclist.c +++ b/sys/dev/raidframe/rf_alloclist.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_alloclist.c,v 1.9 2001/11/20 02:37:29 oster Exp $ */ +/* $NetBSD: rf_alloclist.c,v 1.10 2002/09/14 17:53:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ ***************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_alloclist.c,v 1.9 2001/11/20 02:37:29 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_alloclist.c,v 1.10 2002/09/14 17:53:57 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -87,16 +87,14 @@ rf_ConfigureAllocList(listp) rc = rf_mutex_init(&alist_mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex( __FILE__, __LINE__, rc); return (rc); } al_free_list = NULL; fl_hit_count = fl_miss_count = al_free_list_count = 0; rc = rf_ShutdownCreate(listp, rf_ShutdownAllocList, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown( __FILE__, __LINE__, rc); rf_mutex_destroy(&alist_mutex); return (rc); } diff --git a/sys/dev/raidframe/rf_callback.c b/sys/dev/raidframe/rf_callback.c index d13f09f963b..a7ca2dada58 100644 --- a/sys/dev/raidframe/rf_callback.c +++ b/sys/dev/raidframe/rf_callback.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_callback.c,v 1.6 2001/11/13 07:11:12 lukem Exp $ */ +/* $NetBSD: rf_callback.c,v 1.7 2002/09/14 17:53:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_callback.c,v 1.6 2001/11/13 07:11:12 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_callback.c,v 1.7 2002/09/14 17:53:59 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -71,8 +71,7 @@ rf_ConfigureCallback(listp) return (ENOMEM); rc = rf_ShutdownCreate(listp, rf_ShutdownCallback, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__,__LINE__, rc); rf_ShutdownCallback(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_dagutils.c b/sys/dev/raidframe/rf_dagutils.c index defaefcffbd..c08cd068226 100644 --- a/sys/dev/raidframe/rf_dagutils.c +++ b/sys/dev/raidframe/rf_dagutils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagutils.c,v 1.14 2002/08/02 03:32:56 oster Exp $ */ +/* $NetBSD: rf_dagutils.c,v 1.15 2002/09/14 17:53:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.14 2002/08/02 03:32:56 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.15 2002/09/14 17:53:59 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -218,8 +218,7 @@ rf_ConfigureDAGs(listp) return (ENOMEM); rc = rf_ShutdownCreate(listp, rf_ShutdownDAGs, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownDAGs(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_debugMem.c b/sys/dev/raidframe/rf_debugMem.c index 5f937f0d6b0..94cc30d09cc 100644 --- a/sys/dev/raidframe/rf_debugMem.c +++ b/sys/dev/raidframe/rf_debugMem.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_debugMem.c,v 1.9 2001/11/13 07:11:13 lukem Exp $ */ +/* $NetBSD: rf_debugMem.c,v 1.10 2002/09/14 17:53:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_debugMem.c,v 1.9 2001/11/13 07:11:13 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_debugMem.c,v 1.10 2002/09/14 17:53:57 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -129,8 +129,7 @@ rf_ConfigureDebugMem(listp) rc = rf_create_managed_mutex(listp, &rf_debug_mem_mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex( __FILE__, __LINE__, rc); return (rc); } if (rf_memDebug) { diff --git a/sys/dev/raidframe/rf_diskqueue.c b/sys/dev/raidframe/rf_diskqueue.c index 4de65703957..366a9a93026 100644 --- a/sys/dev/raidframe/rf_diskqueue.c +++ b/sys/dev/raidframe/rf_diskqueue.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.c,v 1.17 2002/08/02 04:01:51 oster Exp $ */ +/* $NetBSD: rf_diskqueue.c,v 1.18 2002/09/14 17:53:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -66,7 +66,7 @@ ****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.17 2002/08/02 04:01:51 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.18 2002/09/14 17:53:57 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -204,14 +204,12 @@ rf_ConfigureDiskQueue( diskqueue->rf_cinfo = &raidPtr->raid_cinfo[r][c]; rc = rf_create_managed_mutex(listp, &diskqueue->mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (rc); } rc = rf_create_managed_cond(listp, &diskqueue->cond); if (rc) { - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); return (rc); } return (0); @@ -236,8 +234,7 @@ rf_ConfigureDiskQueueSystem(listp) return (ENOMEM); rc = rf_ShutdownCreate(listp, rf_ShutdownDiskQueueSystem, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown( __FILE__, __LINE__, rc); rf_ShutdownDiskQueueSystem(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c index 59eb5b79226..f9da3cc5fd3 100644 --- a/sys/dev/raidframe/rf_driver.c +++ b/sys/dev/raidframe/rf_driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.57 2002/09/11 02:22:49 oster Exp $ */ +/* $NetBSD: rf_driver.c,v 1.58 2002/09/14 17:53:58 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -73,7 +73,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.57 2002/09/11 02:22:49 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.58 2002/09/14 17:53:58 oster Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -173,8 +173,7 @@ rf_BootRaidframe() rc = rf_lkmgr_mutex_init(&configureMutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex( __FILE__, __LINE__, rc); RF_PANIC(); } configureCount = 0; @@ -317,8 +316,7 @@ rf_Shutdown(raidPtr) #define DO_RAID_MUTEX(_m_) { \ rc = rf_create_managed_mutex(&raidPtr->shutdownList, (_m_)); \ if (rc) { \ - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", \ - __FILE__, __LINE__, rc); \ + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); \ DO_RAID_FAIL(); \ return(rc); \ } \ @@ -327,8 +325,7 @@ rf_Shutdown(raidPtr) #define DO_RAID_COND(_c_) { \ rc = rf_create_managed_cond(&raidPtr->shutdownList, (_c_)); \ if (rc) { \ - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", \ - __FILE__, __LINE__, rc); \ + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); \ DO_RAID_FAIL(); \ return(rc); \ } \ @@ -348,8 +345,7 @@ rf_Configure(raidPtr, cfgPtr, ac) if (isconfigged == 0) { rc = rf_create_managed_mutex(&globalShutdown, &rf_printf_mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); rf_ShutdownList(&globalShutdown); return (rc); } @@ -393,8 +389,7 @@ rf_Configure(raidPtr, cfgPtr, ac) (void (*) (void *)) rf_FreeAllocList, raidPtr->cleanupList); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); DO_RAID_FAIL(); return (rc); } @@ -516,14 +511,12 @@ init_rad(desc) rc = rf_mutex_init(&desc->mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (rc); } rc = rf_cond_init(&desc->cond); if (rc) { - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); rf_mutex_destroy(&desc->mutex); return (rc); } @@ -558,8 +551,7 @@ rf_ConfigureRDFreeList(listp) } rc = rf_ShutdownCreate(listp, rf_ShutdownRDFreeList, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownRDFreeList(NULL); return (rc); } @@ -892,8 +884,7 @@ rf_InitThroughputStats( /* these used by user-level raidframe only */ rc = rf_create_managed_mutex(listp, &raidPtr->throughputstats.mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (rc); } raidPtr->throughputstats.sum_io_us = 0; @@ -1017,3 +1008,33 @@ rf_print_assert_panic_message(line,file,condition) "raidframe error at line %d file %s (failed asserting %s)\n", line, file, condition); } + +void +rf_print_unable_to_init_mutex(file,line,rc) + char *file; + int line; + int rc; +{ + RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", + file, line, rc); +} + +void +rf_print_unable_to_init_cond(file,line,rc) + char *file; + int line; + int rc; +{ + RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", + file, line, rc); +} + +void +rf_print_unable_to_add_shutdown(file,line,rc) + char *file; + int line; + int rc; +{ + RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", + file, line, rc); +} diff --git a/sys/dev/raidframe/rf_engine.c b/sys/dev/raidframe/rf_engine.c index 5f85a80f33e..94119b09f5f 100644 --- a/sys/dev/raidframe/rf_engine.c +++ b/sys/dev/raidframe/rf_engine.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_engine.c,v 1.15 2002/07/14 03:04:02 oster Exp $ */ +/* $NetBSD: rf_engine.c,v 1.16 2002/09/14 17:53:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -55,7 +55,7 @@ ****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.15 2002/07/14 03:04:02 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.16 2002/09/14 17:53:59 oster Exp $"); #include "rf_threadstuff.h" @@ -163,8 +163,7 @@ rf_ConfigureEngine( } rc = rf_ShutdownCreate(listp, rf_ShutdownEngine, raidPtr); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownEngine(NULL); } return (rc); diff --git a/sys/dev/raidframe/rf_general.h b/sys/dev/raidframe/rf_general.h index a10fc3a7d97..24c459a19f0 100644 --- a/sys/dev/raidframe/rf_general.h +++ b/sys/dev/raidframe/rf_general.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_general.h,v 1.9 2001/10/04 15:58:53 oster Exp $ */ +/* $NetBSD: rf_general.h,v 1.10 2002/09/14 17:53:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -50,7 +50,11 @@ void rf_print_panic_message(int, char *); void rf_print_assert_panic_message(int, char *, char *); +void rf_print_unable_to_init_mutex(char *, int, int); +void rf_print_unable_to_init_cond(char *, int, int); +void rf_print_unable_to_add_shutdown(char *, int, int); + extern char rf_panicbuf[]; #define RF_PANIC() {rf_print_panic_message(__LINE__,__FILE__); panic(rf_panicbuf);} diff --git a/sys/dev/raidframe/rf_map.c b/sys/dev/raidframe/rf_map.c index 0c4f33aeec7..2b6c9840419 100644 --- a/sys/dev/raidframe/rf_map.c +++ b/sys/dev/raidframe/rf_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.c,v 1.13 2002/08/03 01:06:48 oster Exp $ */ +/* $NetBSD: rf_map.c,v 1.14 2002/09/14 17:53:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ **************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.13 2002/08/03 01:06:48 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.14 2002/09/14 17:53:59 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -354,8 +354,7 @@ rf_ConfigureMapModule(listp) } rc = rf_ShutdownCreate(listp, rf_ShutdownMapModule, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownMapModule(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_mcpair.c b/sys/dev/raidframe/rf_mcpair.c index df183ffada2..f6d666a7a3a 100644 --- a/sys/dev/raidframe/rf_mcpair.c +++ b/sys/dev/raidframe/rf_mcpair.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_mcpair.c,v 1.7 2001/11/13 07:11:14 lukem Exp $ */ +/* $NetBSD: rf_mcpair.c,v 1.8 2002/09/14 17:53:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_mcpair.c,v 1.7 2001/11/13 07:11:14 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_mcpair.c,v 1.8 2002/09/14 17:53:58 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -65,14 +65,12 @@ init_mcpair(t) rc = rf_mutex_init(&t->mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (rc); } rc = rf_cond_init(&t->cond); if (rc) { - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); rf_mutex_destroy(&t->mutex); return (rc); } @@ -104,8 +102,7 @@ rf_ConfigureMCPair(listp) RF_MCPAIR_INC, sizeof(RF_MCPair_t)); rc = rf_ShutdownCreate(listp, rf_ShutdownMCPair, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownMCPair(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_paritylog.c b/sys/dev/raidframe/rf_paritylog.c index 6f7e0e1ab65..8b7069ab8cd 100644 --- a/sys/dev/raidframe/rf_paritylog.c +++ b/sys/dev/raidframe/rf_paritylog.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylog.c,v 1.8 2002/05/22 15:40:51 wiz Exp $ */ +/* $NetBSD: rf_paritylog.c,v 1.9 2002/09/14 17:53:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_paritylog.c,v 1.8 2002/05/22 15:40:51 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_paritylog.c,v 1.9 2002/09/14 17:53:58 oster Exp $"); #include "rf_archs.h" @@ -78,8 +78,7 @@ AllocParityLogCommonData(RF_Raid_t * raidPtr) RF_Malloc(common, sizeof(RF_CommonLogData_t), (RF_CommonLogData_t *)); rc = rf_mutex_init(&common->mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); RF_Free(common, sizeof(RF_CommonLogData_t)); common = NULL; } diff --git a/sys/dev/raidframe/rf_paritylogging.c b/sys/dev/raidframe/rf_paritylogging.c index b607b2aa4d6..dea12c9abef 100644 --- a/sys/dev/raidframe/rf_paritylogging.c +++ b/sys/dev/raidframe/rf_paritylogging.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogging.c,v 1.12 2001/11/13 07:11:15 lukem Exp $ */ +/* $NetBSD: rf_paritylogging.c,v 1.13 2002/09/14 17:53:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_paritylogging.c,v 1.12 2001/11/13 07:11:15 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_paritylogging.c,v 1.13 2002/09/14 17:53:58 oster Exp $"); #include "rf_archs.h" @@ -240,8 +240,7 @@ rf_ConfigureParityLogging( lHeapPtr = raidPtr->parityLogBufferHeap; rc = rf_mutex_init(&raidPtr->parityLogPool.mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); RF_Free(raidPtr->parityLogBufferHeap, raidPtr->numParityLogs * raidPtr->numSectorsPerLog * raidPtr->bytesPerSector); return (ENOMEM); @@ -312,14 +311,12 @@ rf_ConfigureParityLogging( /* build pool of region buffers */ rc = rf_mutex_init(&raidPtr->regionBufferPool.mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (ENOMEM); } rc = rf_cond_init(&raidPtr->regionBufferPool.cond); if (rc) { - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); rf_mutex_destroy(&raidPtr->regionBufferPool.mutex); return (ENOMEM); } @@ -382,14 +379,12 @@ rf_ConfigureParityLogging( parityBufferCapacity = maxRegionParityRange; rc = rf_mutex_init(&raidPtr->parityBufferPool.mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (rc); } rc = rf_cond_init(&raidPtr->parityBufferPool.cond); if (rc) { - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); rf_mutex_destroy(&raidPtr->parityBufferPool.mutex); return (ENOMEM); } @@ -453,14 +448,12 @@ rf_ConfigureParityLogging( rc = rf_create_managed_mutex(listp, &raidPtr->parityLogDiskQueue.mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (rc); } rc = rf_create_managed_cond(listp, &raidPtr->parityLogDiskQueue.cond); if (rc) { - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); return (rc); } raidPtr->parityLogDiskQueue.flushQueue = NULL; @@ -487,8 +480,7 @@ rf_ConfigureParityLogging( for (i = 0; i < rf_numParityRegions; i++) { rc = rf_mutex_init(&raidPtr->regionInfo[i].mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); for (j = 0; j < i; j++) FreeRegionInfo(raidPtr, j); RF_Free(raidPtr->regionInfo, @@ -498,8 +490,7 @@ rf_ConfigureParityLogging( } rc = rf_mutex_init(&raidPtr->regionInfo[i].reintMutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); rf_mutex_destroy(&raidPtr->regionInfo[i].mutex); for (j = 0; j < i; j++) FreeRegionInfo(raidPtr, j); diff --git a/sys/dev/raidframe/rf_psstatus.c b/sys/dev/raidframe/rf_psstatus.c index cb6f9a79574..b1e47529c4e 100644 --- a/sys/dev/raidframe/rf_psstatus.c +++ b/sys/dev/raidframe/rf_psstatus.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.c,v 1.8 2001/11/13 07:11:16 lukem Exp $ */ +/* $NetBSD: rf_psstatus.c,v 1.9 2002/09/14 17:53:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.8 2001/11/13 07:11:16 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.9 2002/09/14 17:53:58 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -107,8 +107,7 @@ rf_ConfigurePSStatus( return (ENOMEM); rc = rf_ShutdownCreate(listp, rf_ShutdownPSStatus, raidPtr); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownPSStatus(raidPtr); return (rc); } @@ -132,8 +131,7 @@ rf_MakeParityStripeStatusTable(raidPtr) for (i = 0; i < raidPtr->pssTableSize; i++) { rc = rf_mutex_init(&pssTable[i].mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); /* fail and deallocate */ for (j = 0; j < i; j++) { rf_mutex_destroy(&pssTable[i].mutex); diff --git a/sys/dev/raidframe/rf_reconmap.c b/sys/dev/raidframe/rf_reconmap.c index c2116e8ffde..4fc0e797f84 100644 --- a/sys/dev/raidframe/rf_reconmap.c +++ b/sys/dev/raidframe/rf_reconmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconmap.c,v 1.8 2001/11/13 07:11:16 lukem Exp $ */ +/* $NetBSD: rf_reconmap.c,v 1.9 2002/09/14 17:53:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ *************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.8 2001/11/13 07:11:16 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.9 2002/09/14 17:53:58 oster Exp $"); #include "rf_raid.h" #include <sys/time.h> @@ -107,8 +107,7 @@ rf_MakeReconMap(raidPtr, ru_sectors, disk_sectors, spareUnitsPerDisk) rc = rf_mutex_init(&p->mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); RF_Free(p->status, num_rus * sizeof(RF_ReconMapListElem_t *)); RF_Free(p, sizeof(RF_ReconMap_t)); return (NULL); diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 0232ccd984e..e91e1eec146 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.36 2002/09/14 17:53:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.36 2002/09/14 17:53:59 oster Exp $"); #include <sys/time.h> #include <sys/buf.h> @@ -55,9 +55,9 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.35 2002/09/09 02:44:17 oster Ex #include "rf_etimer.h" #include "rf_dag.h" #include "rf_desc.h" +#include "rf_debugprint.h" #include "rf_general.h" #include "rf_freelist.h" -#include "rf_debugprint.h" #include "rf_driver.h" #include "rf_utils.h" #include "rf_shutdown.h" @@ -215,8 +215,7 @@ rf_ConfigureReconstruction(listp) } rc = rf_ShutdownCreate(listp, rf_ShutdownReconstruction, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownReconstruction(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_reconutil.c b/sys/dev/raidframe/rf_reconutil.c index e7546665fea..14f80994023 100644 --- a/sys/dev/raidframe/rf_reconutil.c +++ b/sys/dev/raidframe/rf_reconutil.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconutil.c,v 1.5 2001/11/13 07:11:16 lukem Exp $ */ +/* $NetBSD: rf_reconutil.c,v 1.6 2002/09/14 17:53:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ ********************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconutil.c,v 1.5 2001/11/13 07:11:16 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconutil.c,v 1.6 2002/09/14 17:53:58 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -121,15 +121,13 @@ rf_MakeReconControl(reconDesc, frow, fcol, srow, scol) rc = rf_mutex_init(&reconCtrlPtr->eq_mutex); if (rc) { /* XXX deallocate, cleanup */ - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (NULL); } rc = rf_cond_init(&reconCtrlPtr->eq_cond); if (rc) { /* XXX deallocate, cleanup */ - RF_ERRORMSG3("Unable to init cond file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); return (NULL); } reconCtrlPtr->eventQueue = NULL; @@ -139,8 +137,7 @@ rf_MakeReconControl(reconDesc, frow, fcol, srow, scol) rc = rf_mutex_init(&reconCtrlPtr->rb_mutex); if (rc) { /* XXX deallocate, cleanup */ - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); return (NULL); } reconCtrlPtr->fullBufferList = NULL; diff --git a/sys/dev/raidframe/rf_revent.c b/sys/dev/raidframe/rf_revent.c index c4cf4a9287e..eae3fb58226 100644 --- a/sys/dev/raidframe/rf_revent.c +++ b/sys/dev/raidframe/rf_revent.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_revent.c,v 1.10 2001/11/13 07:11:16 lukem Exp $ */ +/* $NetBSD: rf_revent.c,v 1.11 2002/09/14 17:54:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_revent.c,v 1.10 2001/11/13 07:11:16 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_revent.c,v 1.11 2002/09/14 17:54:00 oster Exp $"); #include <sys/errno.h> @@ -83,8 +83,7 @@ rf_ConfigureReconEvent(listp) return (ENOMEM); rc = rf_ShutdownCreate(listp, rf_ShutdownReconEvent, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownReconEvent(NULL); return (rc); } diff --git a/sys/dev/raidframe/rf_stripelocks.c b/sys/dev/raidframe/rf_stripelocks.c index 56cecf43a50..711ec500840 100644 --- a/sys/dev/raidframe/rf_stripelocks.c +++ b/sys/dev/raidframe/rf_stripelocks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_stripelocks.c,v 1.13 2002/09/11 02:52:33 oster Exp $ */ +/* $NetBSD: rf_stripelocks.c,v 1.14 2002/09/14 17:53:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_stripelocks.c,v 1.13 2002/09/11 02:52:33 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_stripelocks.c,v 1.14 2002/09/14 17:53:59 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -157,8 +157,7 @@ rf_ConfigureStripeLockFreeList(listp) RF_STRIPELOCK_INITIAL, sizeof(RF_StripeLockDesc_t)); rc = rf_ShutdownCreate(listp, rf_ShutdownStripeLockFreeList, NULL); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownStripeLockFreeList(NULL); return (rc); } @@ -186,8 +185,7 @@ rf_MakeLockTable() for (i = 0; i < rf_lockTableSize; i++) { rc = rf_mutex_init(&lockTable[i].mutex); if (rc) { - RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, - __LINE__, rc); + rf_print_unable_to_init_mutex(__FILE__, __LINE__, rc); /* XXX clean up other mutexes */ return (NULL); } @@ -232,8 +230,7 @@ rf_ConfigureStripeLocks( return (ENOMEM); rc = rf_ShutdownCreate(listp, rf_RaidShutdownStripeLocks, raidPtr); if (rc) { - RF_ERRORMSG3("Unable to add to shutdown list file %s line %d rc=%d\n", - __FILE__, __LINE__, rc); + rf_print_unable_to_add_shutdown(__FILE__, __LINE__, rc); rf_ShutdownStripeLocks(raidPtr->lockTable); return (rc); } |
