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/rf_diskqueue.c | |
| 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/rf_diskqueue.c')
| -rw-r--r-- | sys/dev/raidframe/rf_diskqueue.c | 13 |
1 files changed, 5 insertions, 8 deletions
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); } |
