diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-13 11:37:38 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-13 11:37:38 +0000 |
| commit | 02aad38c79d3dba57d938c05e559fca9797fa85a (patch) | |
| tree | d86f17f2f7d1c86eb8925dedbc683bfcd1a58c30 /sys | |
| parent | c7143e71505ac146245e3db3eadedda2fa034298 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/fdc/fdc.c | 7 | ||||
| -rw-r--r-- | sys/isa/fd.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 68786b6dc508..1dfa3994d7a9 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -2561,6 +2561,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) struct fd_formb *finfo; struct fdc_readid *idfield; size_t fdblk; + int error; fdu = FDUNIT(minor(dev)); fd = devclass_get_softc(fd_devclass, fdu); @@ -2602,11 +2603,9 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) * for the current context. */ fdstrategy(bp); - while ((bp->bio_flags & BIO_DONE) == 0) - tsleep(bp, PRIBIO, "fdcmd", 0); - + error = biowait(bp, "fdcmd"); free(bp, M_TEMP); - return (bp->bio_flags & BIO_ERROR ? bp->bio_error : 0); + return (error); } static int diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 68786b6dc508..1dfa3994d7a9 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -2561,6 +2561,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) struct fd_formb *finfo; struct fdc_readid *idfield; size_t fdblk; + int error; fdu = FDUNIT(minor(dev)); fd = devclass_get_softc(fd_devclass, fdu); @@ -2602,11 +2603,9 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) * for the current context. */ fdstrategy(bp); - while ((bp->bio_flags & BIO_DONE) == 0) - tsleep(bp, PRIBIO, "fdcmd", 0); - + error = biowait(bp, "fdcmd"); free(bp, M_TEMP); - return (bp->bio_flags & BIO_ERROR ? bp->bio_error : 0); + return (error); } static int |
