mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Corrected how CSD is prettyfied.
This commit is contained in:
@@ -491,15 +491,16 @@ namespace DiscImageChef.Decoders.MMC
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
unitFactor = Convert.ToDouble(string.Format("{0:X}", csd.EraseGroupSize));
|
// TODO: Check specification
|
||||||
multiplier = Convert.ToDouble(string.Format("{0:X}", csd.EraseGroupSizeMultiplier));
|
unitFactor = Convert.ToDouble(csd.EraseGroupSize);
|
||||||
|
multiplier = Convert.ToDouble(csd.EraseGroupSizeMultiplier);
|
||||||
result = (unitFactor + 1) * (multiplier + 1);
|
result = (unitFactor + 1) * (multiplier + 1);
|
||||||
sb.AppendFormat("\tDevice can erase a minimum of {0} blocks at a time", (int)result).AppendLine();
|
sb.AppendFormat("\tDevice can erase a minimum of {0} blocks at a time", (int)result).AppendLine();
|
||||||
|
|
||||||
if(csd.WriteProtectGroupEnable)
|
if(csd.WriteProtectGroupEnable)
|
||||||
{
|
{
|
||||||
sb.AppendLine("\tDevice can write protect regions");
|
sb.AppendLine("\tDevice can write protect regions");
|
||||||
unitFactor = Convert.ToDouble(string.Format("{0:X}", csd.WriteProtectGroupSize));
|
unitFactor = Convert.ToDouble(csd.WriteProtectGroupSize);
|
||||||
sb.AppendFormat("\tDevice can write protect a minimum of {0} blocks at a time", (int)(result + 1)).AppendLine();
|
sb.AppendFormat("\tDevice can write protect a minimum of {0} blocks at a time", (int)(result + 1)).AppendLine();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -500,13 +500,14 @@ namespace DiscImageChef.Decoders.SecureDigital
|
|||||||
if(csd.EraseBlockEnable)
|
if(csd.EraseBlockEnable)
|
||||||
sb.AppendLine("\tDevice can erase multiple blocks");
|
sb.AppendLine("\tDevice can erase multiple blocks");
|
||||||
|
|
||||||
sb.AppendFormat("\tDevice must erase a minimum of {0} blocks at a time", Convert.ToUInt32(string.Format("{0:X}", csd.EraseSectorSize)) + 1).AppendLine();
|
// TODO: Check specification
|
||||||
|
sb.AppendFormat("\tDevice must erase a minimum of {0} blocks at a time", Convert.ToUInt32(csd.EraseSectorSize) + 1).AppendLine();
|
||||||
|
|
||||||
if(csd.WriteProtectGroupEnable)
|
if(csd.WriteProtectGroupEnable)
|
||||||
{
|
{
|
||||||
sb.AppendLine("\tDevice can write protect regions");
|
sb.AppendLine("\tDevice can write protect regions");
|
||||||
unitFactor = Convert.ToDouble(string.Format("{0:X}", csd.WriteProtectGroupSize));
|
// 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();
|
sb.AppendFormat("\tDevice can write protect a minimum of {0} blocks at a time", (int)(result + 1)).AppendLine();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user