summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_alloclist.c
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-09-14 17:53:57 +0000
committeroster <oster@NetBSD.org>2002-09-14 17:53:57 +0000
commita2b9142871be6607c6e2ba4783f9b265c09bcac6 (patch)
treec4c170bbdda5640da4aceb0bfadd74b2fb26ee05 /sys/dev/raidframe/rf_alloclist.c
parent954775e02cbfedd06104952e24f5943c8f8bc80a (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/rf_alloclist.c')
-rw-r--r--sys/dev/raidframe/rf_alloclist.c10
1 files changed, 4 insertions, 6 deletions
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);
}