Refactor IMediaImage.ReadSector(s) to return error status instead of buffer.

This commit is contained in:
2021-09-19 21:16:47 +01:00
parent fbccfb2ca9
commit f51d414abd
187 changed files with 4036 additions and 2081 deletions

View File

@@ -109,9 +109,12 @@ namespace Aaru.Filesystems
for(int i = 0; i < clusters.Length; i++)
{
byte[] buffer =
ErrorNumber errno =
_imagePlugin.ReadSectors(_firstClusterSector + ((clusters[i] - 1) * _sectorsPerCluster),
_sectorsPerCluster);
_sectorsPerCluster, out byte[] buffer);
if(errno != ErrorNumber.NoError)
return errno;
Array.Copy(buffer, 0, directoryBuffer, i * _bytesPerCluster, _bytesPerCluster);
}