[Aaru.Core] Reformat and cleanup.

This commit is contained in:
2023-10-03 22:57:50 +01:00
parent 57853b0d2a
commit af659f3fcb
85 changed files with 3303 additions and 1961 deletions

View File

@@ -46,8 +46,8 @@ partial class Dump
/// <param name="supportedPlextorSubchannel">Supported subchannel type</param>
/// <param name="cmdDuration">Time spent sending commands to the drive</param>
/// <returns><c>true</c> if an error occured, <c>false</c> otherwise</returns>
bool ReadPlextorWithSubchannel(out byte[] cmdBuf, out byte[] senseBuf, uint firstSectorToRead, uint blockSize,
uint blocksToRead, PlextorSubchannel supportedPlextorSubchannel,
bool ReadPlextorWithSubchannel(out byte[] cmdBuf, out byte[] senseBuf, uint firstSectorToRead, uint blockSize,
uint blocksToRead, PlextorSubchannel supportedPlextorSubchannel,
out double cmdDuration)
{
bool sense;
@@ -93,18 +93,19 @@ partial class Dump
return true;
sense = _dev.PlextorReadCdDa(out byte[] subBuf, out senseBuf, firstSectorToRead, subSize, blocksToRead,
supportedPlextorSubchannel == PlextorSubchannel.Pack ? PlextorSubchannel.All
supportedPlextorSubchannel == PlextorSubchannel.Pack
? PlextorSubchannel.All
: supportedPlextorSubchannel, 0, out cmdDuration);
if(sense)
return true;
cmdBuf = new byte[(2352 * blocksToRead) + (subSize * blocksToRead)];
cmdBuf = new byte[2352 * blocksToRead + subSize * blocksToRead];
for(int b = 0; b < blocksToRead; b++)
for(var b = 0; b < blocksToRead; b++)
{
Array.Copy(dataBuf, 2352 * b, cmdBuf, (2352 + subSize) * b, 2352);
Array.Copy(subBuf, subSize * b, cmdBuf, ((2352 + subSize) * b) + 2352, subSize);
Array.Copy(dataBuf, 2352 * b, cmdBuf, (2352 + subSize) * b, 2352);
Array.Copy(subBuf, subSize * b, cmdBuf, (2352 + subSize) * b + 2352, subSize);
}
return false;