mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix bugs in dumping, and reading/writing aaruformat
This commit is contained in:
@@ -63,7 +63,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
void ReadSbcData(in ulong blocks, in uint maxBlocksToRead, in uint blockSize, DumpHardwareType currentTry,
|
||||
ExtentsULong extents, ref double currentSpeed, ref double minSpeed, ref double maxSpeed,
|
||||
ref double totalDuration, Reader scsiReader, MhddLog mhddLog, IbgLog ibgLog,
|
||||
ref double imageWriteDuration, ref bool newTrim, DVDDecryption dvdDecrypt, byte[] discKey)
|
||||
ref double imageWriteDuration, ref bool newTrim, ref DVDDecryption dvdDecrypt, byte[] discKey)
|
||||
{
|
||||
ulong sectorSpeedStart = 0;
|
||||
bool sense;
|
||||
|
||||
@@ -667,6 +667,12 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
bool newTrim = false;
|
||||
|
||||
if(_decryption && _titleKeys)
|
||||
{
|
||||
UpdateStatus?.Invoke("Title keys dumping is enabled. This will be very slow.");
|
||||
_resume.MissingTitleKeys ??= new List<ulong>(Enumerable.Range(0, (int)blocks).Select(n => (ulong)n));
|
||||
}
|
||||
|
||||
if(_dev.ScsiType == PeripheralDeviceTypes.OpticalDevice)
|
||||
ReadOpticalData(blocks, blocksToRead, blockSize, currentTry, extents, ref currentSpeed, ref minSpeed,
|
||||
ref maxSpeed, ref totalDuration, scsiReader, mhddLog, ibgLog, ref imageWriteDuration,
|
||||
@@ -674,7 +680,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
else
|
||||
ReadSbcData(blocks, blocksToRead, blockSize, currentTry, extents, ref currentSpeed, ref minSpeed,
|
||||
ref maxSpeed, ref totalDuration, scsiReader, mhddLog, ibgLog, ref imageWriteDuration,
|
||||
ref newTrim, dvdDecrypt, mediaTags[MediaTagType.DVD_DiscKey_Decrypted]);
|
||||
ref newTrim, ref dvdDecrypt, mediaTags[MediaTagType.DVD_DiscKey_Decrypted]);
|
||||
|
||||
end = DateTime.UtcNow;
|
||||
mhddLog.Close();
|
||||
|
||||
@@ -366,7 +366,7 @@ namespace Aaru.DiscImages
|
||||
GC.GetTotalMemory(false));
|
||||
|
||||
break;
|
||||
case DataType.DvdDiscKeyDecrypted:
|
||||
case DataType.DvdSectorTitleKeyDecrypted:
|
||||
_sectorDecryptedTitleKey = data;
|
||||
|
||||
if(!_imageInfo.ReadableSectorTags.Contains(SectorTagType.DvdTitleKeyDecrypted))
|
||||
|
||||
@@ -537,6 +537,12 @@ namespace Aaru.DiscImages
|
||||
case DataType.DvdSectorCpiMai:
|
||||
_sectorCpiMai = data;
|
||||
|
||||
if(!_imageInfo.ReadableSectorTags.Contains(SectorTagType.DvdCmi))
|
||||
_imageInfo.ReadableSectorTags.Add(SectorTagType.DvdCmi);
|
||||
|
||||
if(!_imageInfo.ReadableSectorTags.Contains(SectorTagType.DvdTitleKey))
|
||||
_imageInfo.ReadableSectorTags.Add(SectorTagType.DvdTitleKey);
|
||||
|
||||
AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes",
|
||||
GC.GetTotalMemory(false));
|
||||
|
||||
@@ -544,6 +550,9 @@ namespace Aaru.DiscImages
|
||||
case DataType.DvdSectorTitleKeyDecrypted:
|
||||
_sectorDecryptedTitleKey = data;
|
||||
|
||||
if(!_imageInfo.ReadableSectorTags.Contains(SectorTagType.DvdTitleKeyDecrypted))
|
||||
_imageInfo.ReadableSectorTags.Add(SectorTagType.DvdTitleKeyDecrypted);
|
||||
|
||||
AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes",
|
||||
GC.GetTotalMemory(false));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user