Add support for negative sectors to read and write sector calls in images.

This commit is contained in:
2025-10-23 03:07:43 +01:00
parent 0c19fe1b11
commit 69738f5f1a
289 changed files with 2676 additions and 1352 deletions

View File

@@ -86,7 +86,7 @@ public sealed partial class VTOC : IPartition
0, 1, 8, 29
}.TakeWhile(i => i + sectorOffset < imagePlugin.Info.Sectors))
{
errno = imagePlugin.ReadSector(i + sectorOffset, out pdsector, out _);
errno = imagePlugin.ReadSector(i + sectorOffset, false, out pdsector, out _);
if(errno != ErrorNumber.NoError) continue;
@@ -169,7 +169,7 @@ public sealed partial class VTOC : IPartition
magicFound = false;
var useOld = false;
errno = imagePlugin.ReadSector(pdloc + sectorOffset + 1, out byte[] vtocsector, out _);
errno = imagePlugin.ReadSector(pdloc + sectorOffset + 1, false, out byte[] vtocsector, out _);
if(errno != ErrorNumber.NoError) return false;
@@ -249,7 +249,7 @@ public sealed partial class VTOC : IPartition
return false;
}
errno = imagePlugin.ReadSectors(relSecPtr + sectorOffset, secCount, out byte[] tmp, out _);
errno = imagePlugin.ReadSectors(relSecPtr + sectorOffset, false, secCount, out byte[] tmp, out _);
if(errno != ErrorNumber.NoError) return false;