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:
@@ -50,11 +50,9 @@ namespace DiscImageChef.Decoders.SecureDigital
|
||||
{
|
||||
public static CID DecodeCID(uint[] response)
|
||||
{
|
||||
if(response == null)
|
||||
return null;
|
||||
if(response == null) return null;
|
||||
|
||||
if(response.Length != 4)
|
||||
return null;
|
||||
if(response.Length != 4) return null;
|
||||
|
||||
byte[] data = new byte[16];
|
||||
byte[] tmp = new byte[4];
|
||||
@@ -73,11 +71,9 @@ namespace DiscImageChef.Decoders.SecureDigital
|
||||
|
||||
public static CID DecodeCID(byte[] response)
|
||||
{
|
||||
if(response == null)
|
||||
return null;
|
||||
if(response == null) return null;
|
||||
|
||||
if(response.Length != 16)
|
||||
return null;
|
||||
if(response.Length != 16) return null;
|
||||
|
||||
byte[] tmp;
|
||||
|
||||
@@ -99,8 +95,7 @@ namespace DiscImageChef.Decoders.SecureDigital
|
||||
|
||||
public static string PrettifyCID(CID cid)
|
||||
{
|
||||
if(cid == null)
|
||||
return null;
|
||||
if(cid == null) return null;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -108,9 +103,11 @@ namespace DiscImageChef.Decoders.SecureDigital
|
||||
sb.AppendFormat("\tManufacturer: {0}", VendorString.Prettify(cid.Manufacturer)).AppendLine();
|
||||
sb.AppendFormat("\tApplication ID: {0}", cid.ApplicationID).AppendLine();
|
||||
sb.AppendFormat("\tProduct name: {0}", cid.ProductName).AppendLine();
|
||||
sb.AppendFormat("\tProduct revision: {0:X2}.{1:X2}", (cid.ProductRevision & 0xF0) >> 4, cid.ProductRevision & 0x0F).AppendLine();
|
||||
sb.AppendFormat("\tProduct revision: {0:X2}.{1:X2}", (cid.ProductRevision & 0xF0) >> 4,
|
||||
cid.ProductRevision & 0x0F).AppendLine();
|
||||
sb.AppendFormat("\tProduct serial number: {0}", cid.ProductSerialNumber).AppendLine();
|
||||
sb.AppendFormat("\tDevice manufactured month {0} of {1}", (cid.ManufacturingDate & 0xF00) >> 8, (cid.ManufacturingDate & 0xFF) + 2000).AppendLine();
|
||||
sb.AppendFormat("\tDevice manufactured month {0} of {1}", (cid.ManufacturingDate & 0xF00) >> 8,
|
||||
(cid.ManufacturingDate & 0xFF) + 2000).AppendLine();
|
||||
sb.AppendFormat("\tCID CRC: 0x{0:X2}", cid.CRC).AppendLine();
|
||||
|
||||
return sb.ToString();
|
||||
@@ -126,4 +123,4 @@ namespace DiscImageChef.Decoders.SecureDigital
|
||||
return PrettifyCID(DecodeCID(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user