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

@@ -172,10 +172,9 @@ namespace DiscImageChef.Decoders.SCSI
if(page.SSEC) sb.AppendLine("\tDrive supports soft-sectoring format");
if(page.HSEC) sb.AppendLine("\tDrive supports hard-sectoring format");
if(page.RMB) sb.AppendLine("\tDrive media is removable");
if(page.SURF)
sb.AppendLine("\tSector addressing is progressively incremented in one surface before going to the next");
else
sb.AppendLine("\tSector addressing is progressively incremented in one cylinder before going to the next");
sb.AppendLine(page.SURF
? "\tSector addressing is progressively incremented in one surface before going to the next"
: "\tSector addressing is progressively incremented in one cylinder before going to the next");
return sb.ToString();
}

View File

@@ -46,11 +46,8 @@ namespace DiscImageChef.Decoders.SCSI
{
if(modeResponse == null || modeResponse.Length < 8) return null;
ushort modeLength;
ushort blockDescLength;
modeLength = (ushort)((modeResponse[0] << 8) + modeResponse[1]);
blockDescLength = (ushort)((modeResponse[6] << 8) + modeResponse[7]);
ushort modeLength = (ushort)((modeResponse[0] << 8) + modeResponse[1]);
ushort blockDescLength = (ushort)((modeResponse[6] << 8) + modeResponse[7]);
if(modeResponse.Length < modeLength) return null;