Make the arguments to d_close() match the arguments to d_open(), since

otherwise the close operation is void, and the underlying device remains
marked as being busy.

Thanks to phk for finding this.

MFC after:	3 days
This commit is contained in:
Joerg Wunsch 2003-01-22 14:06:46 +00:00
parent 56b3905f15
commit d50ea522c1

View File

@ -218,7 +218,7 @@ close_locked_drive(struct drive *drive)
* the queues, which spec_close() will try to
* do. Get rid of them here first.
*/
error = (*devsw(drive->dev)->d_close) (drive->dev, 0, 0, NULL);
error = (*devsw(drive->dev)->d_close) (drive->dev, FWRITE | FREAD, 0, NULL);
drive->flags &= ~VF_OPEN; /* no longer open */
if (drive->lasterror == 0)
drive->lasterror = error;