From afccbaa6d7a37a5c56616e87697746b10b7be09a Mon Sep 17 00:00:00 2001 From: oster <oster@NetBSD.org> Date: Mon, 21 Feb 2000 23:33:45 +0000 Subject: [PATCH] Umm.. let's set 'numraid' to something useful before we try to use it. --- sys/dev/raidframe/rf_netbsdkintf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 9846fa0afe72..a4a855d5ea90 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.49 2000/02/16 01:10:44 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.50 2000/02/21 23:33:45 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -318,6 +318,8 @@ raidattach(num) } /* This is where all the initialization stuff gets done. */ + numraid = num; + /* Make some space for requested number of units... */ RF_Calloc(raidPtrs, num, sizeof(RF_Raid_t *), (RF_Raid_t **)); @@ -350,7 +352,7 @@ raidattach(num) printf("WARNING: no memory for RAIDframe driver\n"); return; } - numraid = num; + bzero(raid_softc, num * sizeof(struct raid_softc)); raidrootdev = (struct device *)malloc(num * sizeof(struct device),