General refactor and cleanup.

This commit is contained in:
2024-05-01 04:05:22 +01:00
parent 185a8c3fd5
commit e46d21bde6
922 changed files with 36437 additions and 29485 deletions

View File

@@ -59,8 +59,7 @@ public sealed partial class Gdi
unknownLbas = new List<ulong>();
ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer);
if(errno != ErrorNumber.NoError)
return null;
if(errno != ErrorNumber.NoError) return null;
var bps = (int)(buffer.Length / length);
var sector = new byte[bps];
@@ -83,8 +82,7 @@ public sealed partial class Gdi
}
}
if(unknownLbas.Count > 0)
return null;
if(unknownLbas.Count > 0) return null;
return failingLbas.Count <= 0;
}
@@ -97,8 +95,7 @@ public sealed partial class Gdi
unknownLbas = new List<ulong>();
ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer);
if(errno != ErrorNumber.NoError)
return null;
if(errno != ErrorNumber.NoError) return null;
var bps = (int)(buffer.Length / length);
var sector = new byte[bps];
@@ -121,8 +118,7 @@ public sealed partial class Gdi
}
}
if(unknownLbas.Count > 0)
return null;
if(unknownLbas.Count > 0) return null;
return failingLbas.Count <= 0;
}