REFACTOR: Use preferred braces style.

This commit is contained in:
2017-12-21 00:44:33 +00:00
parent e9443388ee
commit bce69c9161
171 changed files with 5 additions and 1412 deletions

View File

@@ -610,15 +610,12 @@ namespace DiscImageChef.Decoders.SCSI
descriptor.CodeSet == IdentificationCodeSet.UTF8)
sb.AppendFormat("\tSCSI name string identifier: {0}", descriptor.ASCII).AppendLine();
else
{
sb.AppendFormat("\tSCSI name string identifier (hex): {0}",
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40)).AppendLine();
}
break;
case IdentificationTypes.ProtocolSpecific:
{
if(descriptor.PIV)
{
switch(descriptor.ProtocolIdentifier)
{
case ProtocolIdentifiers.ADT:
@@ -704,7 +701,6 @@ namespace DiscImageChef.Decoders.SCSI
.AppendLine();
break;
}
}
}
break;
@@ -1211,7 +1207,6 @@ namespace DiscImageChef.Decoders.SCSI
if(page.PeripheralDeviceType == PeripheralDeviceTypes.DirectAccess ||
page.PeripheralDeviceType == PeripheralDeviceTypes.SCSIZonedBlockDevice)
{
switch(page.SPT)
{
case 0:
@@ -1240,7 +1235,6 @@ namespace DiscImageChef.Decoders.SCSI
.AppendLine();
break;
}
}
else if(page.PeripheralDeviceType == PeripheralDeviceTypes.SequentialAccess && page.SPT == 1)
sb.AppendLine("Logical unit supports logical block protection");
@@ -2302,7 +2296,6 @@ namespace DiscImageChef.Decoders.SCSI
Match servoMatch;
for(int pos = 5; pos < pageResponse.Length; pos++)
{
if(pageResponse[pos] == 0x00)
{
string str = StringHandlers.CToString(array.ToArray());
@@ -2329,7 +2322,6 @@ namespace DiscImageChef.Decoders.SCSI
array = new List<byte>();
}
else array.Add(pageResponse[pos]);
}
return decoded;
}

View File

@@ -463,10 +463,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
StringBuilder sb = new StringBuilder();
if(response.MaxLBAExtents == 0)
{
if(response.DataLength > 2) sb.AppendLine("Drive can store 256 LBA Extents");
else sb.AppendLine("Drive cannot store LBA Extents");
}
else sb.AppendFormat("Drive can store {0} LBA Extents", response.MaxLBAExtents).AppendLine();
for(int i = 0; i < response.Extents.Length; i++)

View File

@@ -426,14 +426,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
if(decoded.DAC_V) sb.AppendFormat("Disc application code: {0}", decoded.DiscApplicationCode).AppendLine();
if(decoded.OPCTables != null)
{
foreach(OPCTable table in decoded.OPCTables)
{
sb.AppendFormat("OPC values for {0}Kbit/sec.: {1}, {2}, {3}, {4}, {5}, {6}", table.Speed,
table.OPCValues[0], table.OPCValues[1], table.OPCValues[2], table.OPCValues[3],
table.OPCValues[4], table.OPCValues[5]).AppendLine();
}
}
return sb.ToString();
}

View File

@@ -335,7 +335,6 @@ namespace DiscImageChef.Decoders.SCSI
int offset = 8;
while(offset < sense.Length)
{
if(offset + 2 < sense.Length)
{
byte descType = sense[offset];
@@ -349,7 +348,6 @@ namespace DiscImageChef.Decoders.SCSI
offset += descLen;
}
else break;
}
return decoded;
}
@@ -401,7 +399,6 @@ namespace DiscImageChef.Decoders.SCSI
if(decoded.AdditionalLength < 10) return sb.ToString();
if(decoded.SKSV)
{
switch(decoded.SenseKey)
{
case SenseKeys.IllegalRequest:
@@ -428,7 +425,6 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendFormat("Actual retry count is {0}", decoded.SenseKeySpecific & 0xFFFF).AppendLine();
break;
}
}
return sb.ToString();
}
@@ -447,14 +443,12 @@ namespace DiscImageChef.Decoders.SCSI
if(decoded.Descriptors == null || decoded.Descriptors.Count == 0) return sb.ToString();
foreach(KeyValuePair<byte, byte[]> kvp in decoded.Descriptors)
{
switch(kvp.Key)
{
case 0x00:
sb.AppendLine(PrettifyDescriptor00(kvp.Value));
break;
}
}
return sb.ToString();
}