mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Wait for device to exist ASC 28h status. This should be trapped by the
OS but it's being so in some corner cases.
This commit is contained in:
@@ -805,6 +805,23 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
|
||||
mediaTest.MediaIsRecognized &= !sense;
|
||||
}
|
||||
// These should be trapped by the OS but seems in some cases they're not
|
||||
else if(decSense.Value.ASC == 0x28)
|
||||
{
|
||||
int leftRetries = 20;
|
||||
while(leftRetries > 0)
|
||||
{
|
||||
DicConsole.Write("\rWaiting for drive to become ready");
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
sense = dev.ScsiTestUnitReady(out senseBuffer, timeout, out duration);
|
||||
if(!sense)
|
||||
break;
|
||||
|
||||
leftRetries--;
|
||||
}
|
||||
|
||||
mediaTest.MediaIsRecognized &= !sense;
|
||||
}
|
||||
else
|
||||
mediaTest.MediaIsRecognized = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user