summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_layout.c
diff options
context:
space:
mode:
authorPeter Galbavy <peter@cvs.openbsd.org>1999-07-30 14:45:34 +0000
committerPeter Galbavy <peter@cvs.openbsd.org>1999-07-30 14:45:34 +0000
commit2d131282dabeb59997e716557431544d132defee (patch)
tree36b98c66a45bd7e085f283abb47dcf53504808af /sys/dev/raidframe/rf_layout.c
parentaad8058264cfbb51ec169e8ecd7f04209b706634 (diff)
Update RAIDframe from NetBSD-current as of 1999/07/26.
Please note that you *must* follow the upgrade instructions at http://www.cs.usask.ca/staff/oster/clabel_upgrade.html before installing the new raidctl and new kernel using this code.
Diffstat (limited to 'sys/dev/raidframe/rf_layout.c')
-rw-r--r--sys/dev/raidframe/rf_layout.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_layout.c b/sys/dev/raidframe/rf_layout.c
index babc1d691d9..3b337687a72 100644
--- a/sys/dev/raidframe/rf_layout.c
+++ b/sys/dev/raidframe/rf_layout.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: rf_layout.c,v 1.2 1999/02/16 00:02:54 niklas Exp $ */
-/* $NetBSD: rf_layout.c,v 1.3 1999/02/05 00:06:12 oster Exp $ */
+/* $OpenBSD: rf_layout.c,v 1.3 1999/07/30 14:45:32 peter Exp $ */
+/* $NetBSD: rf_layout.c,v 1.4 1999/07/19 01:35:19 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -437,6 +437,13 @@ rf_ConfigureLayout(
layoutPtr->SUsPerRU = cfgPtr->SUsPerRU;
parityConfig = cfgPtr->parityConfig;
+ if (layoutPtr->sectorsPerStripeUnit <= 0) {
+ RF_ERRORMSG2("raid%d: Invalid sectorsPerStripeUnit: %d\n",
+ raidPtr->raidid,
+ (int)layoutPtr->sectorsPerStripeUnit );
+ return (EINVAL);
+ }
+
layoutPtr->stripeUnitsPerDisk = raidPtr->sectorsPerDisk / layoutPtr->sectorsPerStripeUnit;
p = rf_GetLayout(parityConfig);