summaryrefslogtreecommitdiffstats
path: root/lkm
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1998-11-03 06:38:26 +0000
committergrog <grog@FreeBSD.org>1998-11-03 06:38:26 +0000
commit1d2a8a5a9cc3052556d212d5dd62dddc29dc53be (patch)
treeaaa65171a932d184c15c8cac9142b83b450a9969 /lkm
parent14ab1cb81ac331bcf1db66c602e6e02bef1725eb (diff)
downloadFreeBSD-src-1d2a8a5a9cc3052556d212d5dd62dddc29dc53be.zip
FreeBSD-src-1d2a8a5a9cc3052556d212d5dd62dddc29dc53be.tar.gz
Print a warning if we removed a junked drive
Take a drive down if it's not open
Diffstat (limited to 'lkm')
-rw-r--r--lkm/vinum/io.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lkm/vinum/io.c b/lkm/vinum/io.c
index 8feea85..e06d0ef 100644
--- a/lkm/vinum/io.c
+++ b/lkm/vinum/io.c
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: io.c,v 1.19 1998/10/30 00:38:15 grog Exp grog $
+ * $Id: io.c,v 1.18 1998/10/05 02:20:59 grog Exp grog $
*/
#define STATIC /* nothing while we're testing XXX */
@@ -754,9 +754,15 @@ save_config(void)
if ((drive->devicename[0] == '\0') /* XXX we keep getting these nameless drives */
||(drive->label.name[0] == '\0')) { /* XXX we keep getting these nameless drives */
+ printf("Removing incomplete drive, index %d\n", driveno);
+ if (drive->vp) /* how can it be open without a name? */
+ close_drive(drive);
free_drive(drive); /* get rid of it */
break;
}
+ if ((drive->vp == NULL) /* drive not open */
+ &&(drive->state > drive_down)) /* and it thinks it's not down */
+ set_drive_state(driveno, drive_down, setstate_force | setstate_noupdate); /* tell it what's what */
if (drive->state != drive_down) {
#if (__FreeBSD__ >= 3)
getmicrotime(&drive->label.last_update); /* time of last update is now */
OpenPOWER on IntegriCloud