diff --git a/Enums/ErrorNumber.cs b/Enums/ErrorNumber.cs index fa0dfebd6..12e9ef704 100644 --- a/Enums/ErrorNumber.cs +++ b/Enums/ErrorNumber.cs @@ -170,6 +170,7 @@ namespace Aaru.CommonTypes.Enums /// Cannot open device CannotOpenDevice = 27, /// Cannot remove the existing database - CannotRemoveDatabase = -28 + CannotRemoveDatabase = 28, + SectorNotFound=29 } } \ No newline at end of file diff --git a/Interfaces/IMediaImage.cs b/Interfaces/IMediaImage.cs index d05a3ba89..22b986d90 100644 --- a/Interfaces/IMediaImage.cs +++ b/Interfaces/IMediaImage.cs @@ -83,7 +83,8 @@ namespace Aaru.CommonTypes.Interfaces /// Reads a sector's user data. /// The sector's user data. /// Sector address (LBA). - byte[] ReadSector(ulong sectorAddress); + /// + ErrorNumber ReadSector(ulong sectorAddress, out byte[] buffer); /// Reads a sector's tag. /// The sector's tag. @@ -95,7 +96,8 @@ namespace Aaru.CommonTypes.Interfaces /// The sectors user data. /// Starting sector address (LBA). /// How many sectors to read. - byte[] ReadSectors(ulong sectorAddress, uint length); + /// + ErrorNumber ReadSectors(ulong sectorAddress, uint length, out byte[] buffer); /// Reads tag from several sectors. /// The sectors tag.