If there is an OS error only print the sense buffer if it contains data.

This commit is contained in:
2020-11-08 20:40:45 +00:00
parent f08a33f3c2
commit 1308b2b17d

View File

@@ -454,10 +454,12 @@ namespace Aaru.Core.Logging
{
_logSw.WriteLine("SCSI reading LBA {0} operating system error: {1}.", block, errno);
_logSw.Flush();
}
if(senseBuffer is null || senseBuffer.Length == 0)
return;
if(senseBuffer is null ||
senseBuffer.Length == 0 ||
senseBuffer.All(s => s == 0))
return;
}
FixedSense? decodedFixedSense = Sense.DecodeFixed(senseBuffer);
DescriptorSense? decodedDescriptorSense = Sense.DecodeDescriptor(senseBuffer);