diff options
author | grog <grog@FreeBSD.org> | 1998-11-03 06:38:26 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1998-11-03 06:38:26 +0000 |
commit | 1d2a8a5a9cc3052556d212d5dd62dddc29dc53be (patch) | |
tree | aaa65171a932d184c15c8cac9142b83b450a9969 /sys/dev | |
parent | 14ab1cb81ac331bcf1db66c602e6e02bef1725eb (diff) | |
download | FreeBSD-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 'sys/dev')
-rw-r--r-- | sys/dev/vinum/vinumio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index 8feea85..e06d0ef 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.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 */ |