summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_layout.c
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2003-02-09 10:04:32 +0000
committerjdolecek <jdolecek@NetBSD.org>2003-02-09 10:04:32 +0000
commite3c5d7b092f23d6b1bb5c2bd27c704faec63d9a2 (patch)
treecf5b9d52a5ce39c9cbf28cb022f9de812ef1a00f /sys/dev/raidframe/rf_layout.c
parentc9fe87550b2c5ed37ccf1439cc98dada0568d75c (diff)
constify some
Diffstat (limited to 'sys/dev/raidframe/rf_layout.c')
-rw-r--r--sys/dev/raidframe/rf_layout.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/raidframe/rf_layout.c b/sys/dev/raidframe/rf_layout.c
index 52910314c1a..8fc91a7ae0c 100644
--- a/sys/dev/raidframe/rf_layout.c
+++ b/sys/dev/raidframe/rf_layout.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_layout.c,v 1.13 2002/09/23 02:35:24 oster Exp $ */
+/* $NetBSD: rf_layout.c,v 1.14 2003/02/09 10:04:33 jdolecek Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_layout.c,v 1.13 2002/09/23 02:35:24 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_layout.c,v 1.14 2003/02/09 10:04:33 jdolecek Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -77,7 +77,8 @@ __KERNEL_RCSID(0, "$NetBSD: rf_layout.c,v 1.13 2002/09/23 02:35:24 oster Exp $")
*
***********************************************************************/
-static RF_AccessState_t DefaultStates[] = {rf_QuiesceState,
+static const RF_AccessState_t DefaultStates[] = {
+ rf_QuiesceState,
rf_IncrAccessesCountState,
rf_MapState,
rf_LockState,
@@ -93,7 +94,7 @@ static RF_AccessState_t DefaultStates[] = {rf_QuiesceState,
/* Note that if you add any new RAID types to this list, that you must
also update the mapsw[] table in the raidctl sources */
-static RF_LayoutSW_t mapsw[] = {
+static const RF_LayoutSW_t mapsw[] = {
#if RF_INCLUDE_PARITY_DECLUSTERING > 0
/* parity declustering */
{'T', "Parity declustering",
@@ -373,10 +374,10 @@ static RF_LayoutSW_t mapsw[] = {
}
};
-RF_LayoutSW_t *
+const RF_LayoutSW_t *
rf_GetLayout(RF_ParityConfig_t parityConfig)
{
- RF_LayoutSW_t *p;
+ const RF_LayoutSW_t *p;
/* look up the specific layout */
for (p = &mapsw[0]; p->parityConfig; p++)
@@ -405,7 +406,7 @@ rf_ConfigureLayout(
{
RF_RaidLayout_t *layoutPtr = &(raidPtr->Layout);
RF_ParityConfig_t parityConfig;
- RF_LayoutSW_t *p;
+ const RF_LayoutSW_t *p;
int retval;
layoutPtr->sectorsPerStripeUnit = cfgPtr->sectPerSU;