1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Be a little less stringent in getting progress report data.

This commit is contained in:
Søren Schmidt 2007-02-21 14:06:51 +00:00
parent ceeb99652d
commit 7d5609f105
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166872

View File

@ -1238,7 +1238,8 @@ acd_get_progress(device_t dev, int *finished)
request->flags = ATA_R_ATAPI | ATA_R_READ;
request->timeout = 30;
ata_queue_request(request);
if (!request->error && request->u.atapi.sense.error & ATA_SENSE_VALID)
if (!request->error &&
request->u.atapi.sense.specific & ATA_SENSE_SPEC_VALID)
*finished = ((request->u.atapi.sense.specific2 |
(request->u.atapi.sense.specific1 << 8)) * 100) / 65535;
else