mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -40,13 +40,10 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
{
|
||||
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
|
||||
{
|
||||
if(report == null)
|
||||
return;
|
||||
if(report == null) return;
|
||||
|
||||
if(dev.Type == DeviceType.MMC)
|
||||
report.MultiMediaCard = new mmcsdType();
|
||||
else if(dev.Type == DeviceType.SecureDigital)
|
||||
report.SecureDigital = new mmcsdType();
|
||||
if(dev.Type == DeviceType.MMC) report.MultiMediaCard = new mmcsdType();
|
||||
else if(dev.Type == DeviceType.SecureDigital) report.SecureDigital = new mmcsdType();
|
||||
|
||||
DicConsole.WriteLine("Trying to get CID...");
|
||||
bool sense = dev.ReadCID(out byte[] cid, out uint[] response, dev.Timeout, out double duration);
|
||||
@@ -77,8 +74,7 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
report.MultiMediaCard.CID = cid;
|
||||
}
|
||||
}
|
||||
else
|
||||
DicConsole.WriteLine("Could not read CID...");
|
||||
else DicConsole.WriteLine("Could not read CID...");
|
||||
|
||||
DicConsole.WriteLine("Trying to get CSD...");
|
||||
sense = dev.ReadCSD(out byte[] csd, out response, dev.Timeout, out duration);
|
||||
@@ -87,13 +83,10 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
{
|
||||
DicConsole.WriteLine("CSD obtained correctly...");
|
||||
|
||||
if(dev.Type == DeviceType.MMC)
|
||||
report.MultiMediaCard.CSD = csd;
|
||||
else if(dev.Type == DeviceType.SecureDigital)
|
||||
report.SecureDigital.CSD = csd;
|
||||
if(dev.Type == DeviceType.MMC) report.MultiMediaCard.CSD = csd;
|
||||
else if(dev.Type == DeviceType.SecureDigital) report.SecureDigital.CSD = csd;
|
||||
}
|
||||
else
|
||||
DicConsole.WriteLine("Could not read CSD...");
|
||||
else DicConsole.WriteLine("Could not read CSD...");
|
||||
|
||||
if(dev.Type == DeviceType.MMC)
|
||||
{
|
||||
@@ -105,8 +98,7 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
DicConsole.WriteLine("OCR obtained correctly...");
|
||||
report.MultiMediaCard.OCR = ocr;
|
||||
}
|
||||
else
|
||||
DicConsole.WriteLine("Could not read OCR...");
|
||||
else DicConsole.WriteLine("Could not read OCR...");
|
||||
|
||||
DicConsole.WriteLine("Trying to get Extended CSD...");
|
||||
sense = dev.ReadExtendedCSD(out byte[] ecsd, out response, dev.Timeout, out duration);
|
||||
@@ -116,8 +108,7 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
DicConsole.WriteLine("Extended CSD obtained correctly...");
|
||||
report.MultiMediaCard.ExtendedCSD = ecsd;
|
||||
}
|
||||
else
|
||||
DicConsole.WriteLine("Could not read Extended CSD...");
|
||||
else DicConsole.WriteLine("Could not read Extended CSD...");
|
||||
}
|
||||
else if(dev.Type == DeviceType.SecureDigital)
|
||||
{
|
||||
@@ -129,8 +120,7 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
DicConsole.WriteLine("OCR obtained correctly...");
|
||||
report.SecureDigital.OCR = ocr;
|
||||
}
|
||||
else
|
||||
DicConsole.WriteLine("Could not read OCR...");
|
||||
else DicConsole.WriteLine("Could not read OCR...");
|
||||
|
||||
DicConsole.WriteLine("Trying to get SCR...");
|
||||
sense = dev.ReadSCR(out byte[] scr, out response, dev.Timeout, out duration);
|
||||
@@ -140,10 +130,8 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
DicConsole.WriteLine("SCR obtained correctly...");
|
||||
report.SecureDigital.SCR = scr;
|
||||
}
|
||||
else
|
||||
DicConsole.WriteLine("Could not read SCR...");
|
||||
else DicConsole.WriteLine("Could not read SCR...");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user