Conditional access is known to be not null.

This commit is contained in:
2021-08-17 17:35:43 +01:00
parent f203b537a8
commit 11cedc2483
3 changed files with 21 additions and 21 deletions

View File

@@ -548,11 +548,11 @@ namespace Aaru.Core.Devices.Report
{
mediaTest.SupportsReadLong = true;
bool valid = decSense?.Fixed?.InformationValid == true;
bool ili = decSense?.Fixed?.ILI == true;
uint information = decSense?.Fixed?.Information ?? 0;
bool valid = decSense.Value.Fixed?.InformationValid == true;
bool ili = decSense.Value.Fixed?.ILI == true;
uint information = decSense.Value.Fixed?.Information ?? 0;
if(decSense?.Descriptor.HasValue == true &&
if(decSense.Value.Descriptor.HasValue &&
decSense.Value.Descriptor.Value.Descriptors.TryGetValue(0, out byte[] desc00))
{
valid = true;
@@ -578,11 +578,11 @@ namespace Aaru.Core.Devices.Report
{
mediaTest.SupportsReadLong16 = true;
bool valid = decSense?.Fixed?.InformationValid == true;
bool ili = decSense?.Fixed?.ILI == true;
uint information = decSense?.Fixed?.Information ?? 0;
bool valid = decSense.Value.Fixed?.InformationValid == true;
bool ili = decSense.Value.Fixed?.ILI == true;
uint information = decSense.Value.Fixed?.Information ?? 0;
if(decSense?.Descriptor.HasValue == true &&
if(decSense.Value.Descriptor.HasValue &&
decSense.Value.Descriptor.Value.Descriptors.TryGetValue(0, out byte[] desc00))
{
valid = true;
@@ -821,11 +821,11 @@ namespace Aaru.Core.Devices.Report
{
capabilities.SupportsReadLong = true;
bool valid = decSense?.Fixed?.InformationValid == true;
bool ili = decSense?.Fixed?.ILI == true;
uint information = decSense?.Fixed?.Information ?? 0;
bool valid = decSense.Value.Fixed?.InformationValid == true;
bool ili = decSense.Value.Fixed?.ILI == true;
uint information = decSense.Value.Fixed?.Information ?? 0;
if(decSense?.Descriptor.HasValue == true &&
if(decSense.Value.Descriptor.HasValue &&
decSense.Value.Descriptor.Value.Descriptors.TryGetValue(0, out byte[] desc00))
{
valid = true;
@@ -852,11 +852,11 @@ namespace Aaru.Core.Devices.Report
{
capabilities.SupportsReadLong16 = true;
bool valid = decSense?.Fixed?.InformationValid == true;
bool ili = decSense?.Fixed?.ILI == true;
uint information = decSense?.Fixed?.Information ?? 0;
bool valid = decSense.Value.Fixed?.InformationValid == true;
bool ili = decSense.Value.Fixed?.ILI == true;
uint information = decSense.Value.Fixed?.Information ?? 0;
if(decSense?.Descriptor.HasValue == true &&
if(decSense.Value.Descriptor.HasValue &&
decSense.Value.Descriptor.Value.Descriptors.TryGetValue(0, out byte[] desc00))
{
valid = true;

View File

@@ -389,13 +389,13 @@ namespace Aaru.Core.Logging
prettySense = prettySense.Replace("\n", " - ");
_logSw.WriteLine("SCSI command {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}, {5}.", command,
decodedSense?.SenseKey, decodedSense?.ASC, decodedSense?.ASCQ, hexSense,
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense,
prettySense);
}
else
{
_logSw.WriteLine("SCSI command {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}.", command,
decodedSense?.SenseKey, decodedSense?.ASC, decodedSense?.ASCQ, hexSense);
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense);
}
}
else
@@ -456,13 +456,13 @@ namespace Aaru.Core.Logging
prettySense = prettySense.Replace("\n", " - ");
_logSw.WriteLine("SCSI reading LBA {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}, {5}.", block,
decodedSense?.SenseKey, decodedSense?.ASC, decodedSense?.ASCQ, hexSense,
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense,
prettySense);
}
else
{
_logSw.WriteLine("SCSI reading LBA {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}.", block,
decodedSense?.SenseKey, decodedSense?.ASC, decodedSense?.ASCQ, hexSense);
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense);
}
}
else