Hack to work around a NULL pointer dereferencation that can be triggered
by removing a floppy that as being operated on. The spagghetti is hardly understandable at all anymore, so i can't 100 % ascertain this is really the Right Thing to do, maybe our new floppy driver maintainer, Jesus Monroy Jr can do this. :-))
This commit is contained in:
parent
6134dbe0ac
commit
409aadb1c9
@ -47,7 +47,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.147 1999/06/26 02:46:52 mckusick Exp $
|
||||
* $Id: fd.c,v 1.148 1999/07/04 14:58:32 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -2127,6 +2127,9 @@ retrier(struct fdc_data *fdc)
|
||||
fail:
|
||||
{
|
||||
dev_t sav_b_dev = bp->b_dev;
|
||||
|
||||
if (fdc->fd == 0)
|
||||
goto bogus;
|
||||
/* Trick diskerr */
|
||||
bp->b_dev = makedev(major(bp->b_dev),
|
||||
(FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
|
||||
@ -2160,6 +2163,7 @@ retrier(struct fdc_data *fdc)
|
||||
DEVSTAT_WRITE);
|
||||
fdc->fd->skip = 0;
|
||||
biodone(bp);
|
||||
bogus:
|
||||
fdc->state = FINDWORK;
|
||||
fdc->flags |= FDC_NEEDS_RESET;
|
||||
fdc->fd = (fd_p) 0;
|
||||
|
@ -47,7 +47,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.147 1999/06/26 02:46:52 mckusick Exp $
|
||||
* $Id: fd.c,v 1.148 1999/07/04 14:58:32 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -2127,6 +2127,9 @@ retrier(struct fdc_data *fdc)
|
||||
fail:
|
||||
{
|
||||
dev_t sav_b_dev = bp->b_dev;
|
||||
|
||||
if (fdc->fd == 0)
|
||||
goto bogus;
|
||||
/* Trick diskerr */
|
||||
bp->b_dev = makedev(major(bp->b_dev),
|
||||
(FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
|
||||
@ -2160,6 +2163,7 @@ retrier(struct fdc_data *fdc)
|
||||
DEVSTAT_WRITE);
|
||||
fdc->fd->skip = 0;
|
||||
biodone(bp);
|
||||
bogus:
|
||||
fdc->state = FINDWORK;
|
||||
fdc->flags |= FDC_NEEDS_RESET;
|
||||
fdc->fd = (fd_p) 0;
|
||||
|
Loading…
Reference in New Issue
Block a user