free_drive: mark drive down. This may fix a panic in the 'start' command.
Reported-by: peter
This commit is contained in:
parent
0888504040
commit
b70434e69d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49869
@ -584,8 +584,10 @@ free_drive(struct drive *drive)
|
||||
if ((drive->state > drive_referenced) /* real drive */
|
||||
||(drive->vp)) { /* how can it be open without a state? */
|
||||
LOCKDRIVE(drive);
|
||||
if (drive->vp) /* it's open, */
|
||||
if (drive->vp) { /* it's open, */
|
||||
close_locked_drive(drive); /* close it */
|
||||
drive->state = drive_down; /* and note the fact */
|
||||
}
|
||||
if (drive->freelist)
|
||||
Free(drive->freelist);
|
||||
bzero(drive, sizeof(struct drive)); /* this also sets drive_unallocated */
|
||||
|
Loading…
Reference in New Issue
Block a user