mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move image and sector verification methods to new interfaces.
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
@@ -523,23 +522,6 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
public byte[] ReadSectorsLong(ulong sectorAddress, uint length) => ReadSectors(sectorAddress, length);
|
||||
|
||||
public bool? VerifySector(ulong sectorAddress) => !sectorsWhereCrcHasFailed.Contains(sectorAddress);
|
||||
|
||||
public bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
|
||||
out List<ulong> unknownLbas)
|
||||
{
|
||||
failingLbas = new List<ulong>();
|
||||
unknownLbas = new List<ulong>();
|
||||
|
||||
for(ulong i = sectorAddress; i < sectorAddress + length; i++)
|
||||
if(sectorsWhereCrcHasFailed.Contains(sectorAddress))
|
||||
failingLbas.Add(sectorAddress);
|
||||
|
||||
return failingLbas.Count <= 0;
|
||||
}
|
||||
|
||||
public bool? VerifyMediaImage() => aDiskCrcHasFailed;
|
||||
|
||||
public byte[] ReadDiskTag(MediaTagType tag)
|
||||
{
|
||||
if(tag != MediaTagType.Floppy_LeadOut)
|
||||
|
||||
Reference in New Issue
Block a user