mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -55,11 +55,9 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
|
||||
public static BlockLimitsData? Decode(byte[] response)
|
||||
{
|
||||
if(response == null)
|
||||
return null;
|
||||
if(response == null) return null;
|
||||
|
||||
if(response.Length != 6)
|
||||
return null;
|
||||
if(response.Length != 6) return null;
|
||||
|
||||
BlockLimitsData dec = new BlockLimitsData();
|
||||
|
||||
@@ -72,8 +70,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
|
||||
public static string Prettify(BlockLimitsData? decoded)
|
||||
{
|
||||
if(decoded == null)
|
||||
return null;
|
||||
if(decoded == null) return null;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -83,13 +80,14 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
{
|
||||
if(decoded.Value.maxBlockLen > 0)
|
||||
sb.AppendFormat("Device's maximum block size is {0} bytes", decoded.Value.maxBlockLen).AppendLine();
|
||||
else
|
||||
sb.AppendLine("Device does not specify a maximum block size");
|
||||
else sb.AppendLine("Device does not specify a maximum block size");
|
||||
sb.AppendFormat("Device's minimum block size is {0} bytes", decoded.Value.minBlockLen).AppendLine();
|
||||
|
||||
if(decoded.Value.granularity > 0)
|
||||
#pragma warning disable IDE0004 // Remove Unnecessary Cast
|
||||
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes", decoded.Value.granularity, Math.Pow(2, (double)decoded.Value.granularity)).AppendLine();
|
||||
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes",
|
||||
decoded.Value.granularity, Math.Pow(2, (double)decoded.Value.granularity))
|
||||
.AppendLine();
|
||||
#pragma warning restore IDE0004 // Remove Unnecessary Cast
|
||||
}
|
||||
|
||||
@@ -101,5 +99,4 @@ namespace DiscImageChef.Decoders.SCSI.SSC
|
||||
return Prettify(Decode(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user