mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Removed unneeded value sets.
This commit is contained in:
@@ -56,7 +56,7 @@ namespace DiscImageChef.Decoders.MMC
|
||||
if(response.Length != 4) return null;
|
||||
|
||||
byte[] data = new byte[16];
|
||||
byte[] tmp = new byte[4];
|
||||
byte[] tmp;
|
||||
|
||||
tmp = BitConverter.GetBytes(response[0]);
|
||||
Array.Copy(tmp, 0, data, 0, 4);
|
||||
@@ -85,7 +85,6 @@ namespace DiscImageChef.Decoders.MMC
|
||||
Array.Copy(response, 3, tmp, 0, 6);
|
||||
cid.ProductName = StringHandlers.CToString(tmp);
|
||||
cid.ProductRevision = response[9];
|
||||
tmp = new byte[4];
|
||||
cid.ProductSerialNumber = BitConverter.ToUInt32(response, 10);
|
||||
cid.ManufacturingDate = response[14];
|
||||
cid.CRC = (byte)((response[15] & 0xFE) >> 1);
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace DiscImageChef.Decoders.MMC
|
||||
if(response.Length != 4) return null;
|
||||
|
||||
byte[] data = new byte[16];
|
||||
byte[] tmp = new byte[4];
|
||||
byte[] tmp;
|
||||
|
||||
tmp = BitConverter.GetBytes(response[0]);
|
||||
Array.Copy(tmp, 0, data, 0, 4);
|
||||
@@ -146,7 +146,7 @@ namespace DiscImageChef.Decoders.MMC
|
||||
|
||||
double unitFactor = 0;
|
||||
double multiplier = 0;
|
||||
double result = 0;
|
||||
double result;
|
||||
string unit = "";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -483,6 +483,7 @@ namespace DiscImageChef.Decoders.MMC
|
||||
if(csd.WriteProtectGroupEnable)
|
||||
{
|
||||
sb.AppendLine("\tDevice can write protect regions");
|
||||
// TODO: Check specification
|
||||
unitFactor = Convert.ToDouble(csd.WriteProtectGroupSize);
|
||||
sb.AppendFormat("\tDevice can write protect a minimum of {0} blocks at a time", (int)(result + 1))
|
||||
.AppendLine();
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace DiscImageChef.Decoders.MMC
|
||||
|
||||
if(response.Length != 512) return null;
|
||||
|
||||
ExtendedCSD csd = new ExtendedCSD();
|
||||
ExtendedCSD csd;
|
||||
GCHandle handle = GCHandle.Alloc(response, GCHandleType.Pinned);
|
||||
csd = (ExtendedCSD)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(ExtendedCSD));
|
||||
handle.Free();
|
||||
|
||||
Reference in New Issue
Block a user