diff options
author | sos <sos@FreeBSD.org> | 2002-12-17 16:27:45 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-12-17 16:27:45 +0000 |
commit | 85e7906b61af65d60fca9ab830d3365dff63e86a (patch) | |
tree | 209d6e92def9539a3ba14b6287482a822951c46c /sys/dev/ata/atapi-cd.c | |
parent | e4d7800551873bd09210020bd42e58b18482d25b (diff) | |
download | FreeBSD-src-85e7906b61af65d60fca9ab830d3365dff63e86a.zip FreeBSD-src-85e7906b61af65d60fca9ab830d3365dff63e86a.tar.gz |
Try to fix the problem with burncd blank not seeing the end of
the blank operation.
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 667bdd2..c431892 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -1600,23 +1600,18 @@ acd_read_track_info(struct acd_softc *cdp, static int acd_get_progress(struct acd_softc *cdp, int *finished) { - int8_t ccb[16] = { ATAPI_REQUEST_SENSE, 0, 0, 0, - sizeof(struct atapi_reqsense), 0, 0, 0, + int8_t ccb[16] = { ATAPI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - struct atapi_reqsense sense; - int error; - - error = atapi_queue_cmd(cdp->device, ccb, - (caddr_t)&sense, sizeof(struct atapi_reqsense), - ATPR_F_READ, 30, NULL, NULL); + struct atapi_reqsense *sense = cdp->device->result; + int8_t dummy[8]; - if (error) { - if (error != EBUSY) - *finished = 100; - return error; + if (atapi_queue_cmd(cdp->device, ccb, dummy, sizeof(dummy), + ATPR_F_READ, 30, NULL, NULL) != EBUSY) { + *finished = 100; + return 0; } - if (sense.sksv) - *finished = ((sense.sk_specific2|(sense.sk_specific1<<8))*100)/65535; + if (sense->sksv) + *finished = ((sense->sk_specific2|(sense->sk_specific1<<8))*100)/65535; else *finished = 0; return 0; |