From 7f288b4e0dff02783a510e37fa5bce920f851a7f Mon Sep 17 00:00:00 2001 From: oster Date: Mon, 20 Mar 2000 22:59:26 +0000 Subject: [PATCH] Just return "100% done" when asked about reconstruction progress on a RAID0 set. --- sys/dev/raidframe/rf_netbsdkintf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 026e1fc42ac7..cf360799fe1d 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.70 2000/03/07 03:09:47 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.71 2000/03/20 22:59:26 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -1251,8 +1251,10 @@ raidioctl(dev, cmd, data, flag, p) /* return the percentage completion of reconstruction */ case RAIDFRAME_CHECK_RECON_STATUS: if (raidPtr->Layout.map->faultsTolerated == 0) { - /* This makes no sense on a RAID 0 */ - return(EINVAL); + /* This makes no sense on a RAID 0, so tell the + user it's done. */ + *(int *) data = 100; + return(0); } row = 0; /* XXX we only consider a single row... */ if (raidPtr->status[row] != rf_rs_reconstructing)