Code restyling.

This commit is contained in:
2020-02-29 18:03:33 +00:00
parent 9abc956373
commit a43b4132ee
40 changed files with 2701 additions and 2473 deletions

View File

@@ -139,8 +139,7 @@ namespace Aaru.Decoders.SCSI
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
string UnrecECCAbortData =
"\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
string UnrecCIRCAbortData =
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";

View File

@@ -86,11 +86,9 @@ namespace Aaru.Decoders.SCSI
decoded.Heads = pageResponse[5];
decoded.WritePrecompCylinder = (uint)((pageResponse[6] << 16) + (pageResponse[7] << 8) + pageResponse[8]);
decoded.WriteReduceCylinder =
(uint)((pageResponse[9] << 16) + (pageResponse[10] << 8) + pageResponse[11]);
decoded.WriteReduceCylinder = (uint)((pageResponse[9] << 16) + (pageResponse[10] << 8) + pageResponse[11]);
decoded.DriveStepRate =
(ushort)((pageResponse[12] << 8) + pageResponse[13]);
decoded.DriveStepRate = (ushort)((pageResponse[12] << 8) + pageResponse[13]);
decoded.LandingCylinder = (pageResponse[14] << 16) + (pageResponse[15] << 8) + pageResponse[16];
decoded.RPL = (byte)(pageResponse[17] & 0x03);

View File

@@ -104,8 +104,7 @@ namespace Aaru.Decoders.SCSI
string UnrecECCNotAbort = "\tUnrecovered ECC errors will not abort the transfer.";
string UnrecCIRCNotAbort = "\tUnrecovered CIRC errors will not abort the transfer.";
string UnrecECCAbortData =
"\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
string UnrecECCAbortData = "\tUnrecovered ECC errors will return CHECK CONDITION and the uncorrected data.";
string UnrecCIRCAbortData =
"\tUnrecovered CIRC errors will return CHECK CONDITION and the uncorrected data.";

View File

@@ -44,18 +44,24 @@ namespace Aaru.Decoders.SCSI
public enum PartitionSizeUnitOfMeasures : byte
{
/// <summary>Partition size is measures in bytes</summary>
Bytes = 0, /// <summary>Partition size is measures in Kilobytes</summary>
Kilobytes = 1, /// <summary>Partition size is measures in Megabytes</summary>
Megabytes = 2, /// <summary>Partition size is 10eUNITS bytes</summary>
Bytes = 0,
/// <summary>Partition size is measures in Kilobytes</summary>
Kilobytes = 1,
/// <summary>Partition size is measures in Megabytes</summary>
Megabytes = 2,
/// <summary>Partition size is 10eUNITS bytes</summary>
Exponential = 3
}
public enum MediumFormatRecognitionValues : byte
{
/// <summary>Logical unit is incapable of format or partition recognition</summary>
Incapable = 0, /// <summary>Logical unit is capable of format recognition only</summary>
FormatCapable = 1, /// <summary>Logical unit is capable of partition recognition only</summary>
PartitionCapable = 2, /// <summary>Logical unit is capable of both format and partition recognition</summary>
Incapable = 0,
/// <summary>Logical unit is capable of format recognition only</summary>
FormatCapable = 1,
/// <summary>Logical unit is capable of partition recognition only</summary>
PartitionCapable = 2,
/// <summary>Logical unit is capable of both format and partition recognition</summary>
Capable = 3
}

View File

@@ -140,8 +140,8 @@ namespace Aaru.Decoders.SCSI
if(page.PS)
sb.AppendLine("\tParameters can be saved");
if(page.Standby && page.StandbyTimer > 0 ||
page.Standby_Y && page.StandbyTimer_Y > 0)
if((page.Standby && page.StandbyTimer > 0) ||
(page.Standby_Y && page.StandbyTimer_Y > 0))
{
if(page.Standby &&
page.StandbyTimer > 0)
@@ -154,9 +154,9 @@ namespace Aaru.Decoders.SCSI
else
sb.AppendLine("\tDrive will not enter standy mode");
if(page.Idle && page.IdleTimer > 0 ||
page.Idle_B && page.IdleTimer_B > 0 ||
page.Idle_C && page.IdleTimer_C > 0)
if((page.Idle && page.IdleTimer > 0) ||
(page.Idle_B && page.IdleTimer_B > 0) ||
(page.Idle_C && page.IdleTimer_C > 0))
{
if(page.Idle &&
page.IdleTimer > 0)

View File

@@ -51,7 +51,7 @@ namespace Aaru.Decoders.SCSI
return
"ECMA-59 & ANSI X3.121-1984: 200 mm Flexible Disk Cartridge using Two-Frequency Recording at 13262 ftprad on Both Sides";
case MediumTypes.ECMA69:
return"ECMA-69: 200 mm Flexible Disk Cartridge using MFM Recording at 13262 ftprad on Both Sides";
return "ECMA-69: 200 mm Flexible Disk Cartridge using MFM Recording at 13262 ftprad on Both Sides";
case MediumTypes.ECMA66:
return
"ECMA-66: 130 mm Flexible Disk Cartridge using Two-Frequency Recording at 7958 ftprad on One Side";
@@ -75,16 +75,16 @@ namespace Aaru.Decoders.SCSI
case MediumTypes.Unspecified_DS:
return "Unspecified double sided flexible disk";
*/
case MediumTypes.X3_73: return"ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.X3_73_DS: return"ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 2 sides";
case MediumTypes.X3_82: return"ANSI X3.80-1980: 130 mm, 3979 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.X3_73: return "ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.X3_73_DS: return "ANSI X3.73-1980: 200 mm, 6631 ftprad, 1,9 Tracks per mm, 2 sides";
case MediumTypes.X3_82: return "ANSI X3.80-1980: 130 mm, 3979 ftprad, 1,9 Tracks per mm, 1 side";
case MediumTypes.Type3Floppy:
return"3.5-inch, 135 tpi, 12362 bits/radian, double-sided MFM (aka 1.25Mb)";
case MediumTypes.HDFloppy: return"3.5-inch, 135 tpi, 15916 bits/radian, double-sided MFM (aka 1.44Mb)";
case MediumTypes.ReadOnly: return"a Read-only optical";
case MediumTypes.WORM: return"a Write-once Read-many optical";
case MediumTypes.Erasable: return"a Erasable optical";
case MediumTypes.RO_WORM: return"a combination of read-only and write-once optical";
return "3.5-inch, 135 tpi, 12362 bits/radian, double-sided MFM (aka 1.25Mb)";
case MediumTypes.HDFloppy: return "3.5-inch, 135 tpi, 15916 bits/radian, double-sided MFM (aka 1.44Mb)";
case MediumTypes.ReadOnly: return "a Read-only optical";
case MediumTypes.WORM: return "a Write-once Read-many optical";
case MediumTypes.Erasable: return "a Erasable optical";
case MediumTypes.RO_WORM: return "a combination of read-only and write-once optical";
// These magneto-opticals were never manufactured
/*
@@ -94,9 +94,9 @@ namespace Aaru.Decoders.SCSI
case MediumTypes.WORM_RW:
return "a combination of write-once and erasable optical";
*/
case MediumTypes.DOW: return"a direct-overwrite optical";
case MediumTypes.HiMD: return"a Sony Hi-MD disc";
default: return$"Unknown medium type 0x{(byte)type:X2}";
case MediumTypes.DOW: return "a direct-overwrite optical";
case MediumTypes.HiMD: return "a Sony Hi-MD disc";
default: return $"Unknown medium type 0x{(byte)type:X2}";
}
}