General refactor.

This commit is contained in:
2018-06-20 22:22:21 +01:00
parent dc1884f5d8
commit ec8b309670
93 changed files with 850 additions and 1015 deletions

View File

@@ -142,7 +142,7 @@ namespace DiscImageChef.Core.Devices
if(CanReadRaw && LongBlockSize == LogicalBlockSize)
if(LogicalBlockSize == 512)
foreach(ushort testSize in new[]
foreach(int i in new[]
{
// Long sector sizes for floppies
514,
@@ -152,6 +152,7 @@ namespace DiscImageChef.Core.Devices
600, 610, 630
})
{
ushort testSize = (ushort)i;
testSense = dev.ReadLong16(out _, out senseBuf, false, 0, testSize, timeout, out _);
if(!testSense && !dev.Error)
{
@@ -171,7 +172,7 @@ namespace DiscImageChef.Core.Devices
break;
}
else if(LogicalBlockSize == 1024)
foreach(ushort testSize in new[]
foreach(int i in new[]
{
// Long sector sizes for floppies
1026,
@@ -179,6 +180,7 @@ namespace DiscImageChef.Core.Devices
1200
})
{
ushort testSize = (ushort)i;
testSense = dev.ReadLong16(out _, out senseBuf, false, 0, testSize, timeout, out _);
if(!testSense && !dev.Error)
{