mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Aaru.Core] Reformat and cleanup.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user