General code refactor and reformat.

This commit is contained in:
2018-12-31 13:17:27 +00:00
parent 06a27f18b0
commit e2bbb9994f
72 changed files with 433 additions and 897 deletions

View File

@@ -172,10 +172,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_81(byte[] pageResponse)
{
return PrettifyPage_81(DecodePage_81(pageResponse));
}
public static string PrettifyPage_81(byte[] pageResponse) => PrettifyPage_81(DecodePage_81(pageResponse));
public static string DefinitionToString(ScsiDefinitions definition)
{
@@ -430,10 +427,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_83(byte[] pageResponse)
{
return PrettifyPage_83(DecodePage_83(pageResponse));
}
public static string PrettifyPage_83(byte[] pageResponse) => PrettifyPage_83(DecodePage_83(pageResponse));
public static string PrettifyPage_83(Page_83? modePage)
{
@@ -823,10 +817,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_84(byte[] pageResponse)
{
return PrettifyPage_84(DecodePage_84(pageResponse));
}
public static string PrettifyPage_84(byte[] pageResponse) => PrettifyPage_84(DecodePage_84(pageResponse));
public static string PrettifyPage_84(Page_84? modePage)
{
@@ -955,10 +946,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_85(byte[] pageResponse)
{
return PrettifyPage_85(DecodePage_85(pageResponse));
}
public static string PrettifyPage_85(byte[] pageResponse) => PrettifyPage_85(DecodePage_85(pageResponse));
public static string PrettifyPage_85(Page_85? modePage)
{
@@ -1216,10 +1204,7 @@ namespace DiscImageChef.Decoders.SCSI
};
}
public static string PrettifyPage_86(byte[] pageResponse)
{
return PrettifyPage_86(DecodePage_86(pageResponse));
}
public static string PrettifyPage_86(byte[] pageResponse) => PrettifyPage_86(DecodePage_86(pageResponse));
public static string PrettifyPage_86(Page_86? modePage)
{
@@ -1384,10 +1369,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_89(byte[] pageResponse)
{
return PrettifyPage_89(DecodePage_89(pageResponse));
}
public static string PrettifyPage_89(byte[] pageResponse) => PrettifyPage_89(DecodePage_89(pageResponse));
// TODO: Decode ATA signature?
public static string PrettifyPage_89(Page_89? modePage)
@@ -1511,10 +1493,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C0_Quantum(byte[] pageResponse)
{
return PrettifyPage_C0_Quantum(DecodePage_C0_Quantum(pageResponse));
}
public static string PrettifyPage_C0_Quantum(byte[] pageResponse) =>
PrettifyPage_C0_Quantum(DecodePage_C0_Quantum(pageResponse));
public static string PrettifyPage_C0_Quantum(Page_C0_Quantum? modePage)
{
@@ -1593,10 +1573,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C0_C1_Certance(byte[] pageResponse)
{
return PrettifyPage_C0_C1_Certance(DecodePage_C0_C1_Certance(pageResponse));
}
public static string PrettifyPage_C0_C1_Certance(byte[] pageResponse) =>
PrettifyPage_C0_C1_Certance(DecodePage_C0_C1_Certance(pageResponse));
public static string PrettifyPage_C0_C1_Certance(Page_C0_C1_Certance? modePage)
{
@@ -1666,10 +1644,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(byte[] pageResponse)
{
return PrettifyPage_C2_C3_C4_C5_C6_Certance(DecodePage_C2_C3_C4_C5_C6_Certance(pageResponse));
}
public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(byte[] pageResponse) =>
PrettifyPage_C2_C3_C4_C5_C6_Certance(DecodePage_C2_C3_C4_C5_C6_Certance(pageResponse));
public static string PrettifyPage_C2_C3_C4_C5_C6_Certance(Page_C2_C3_C4_C5_C6_Certance? modePage)
{
@@ -1837,10 +1813,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_DF_Certance(byte[] pageResponse)
{
return PrettifyPage_DF_Certance(DecodePage_DF_Certance(pageResponse));
}
public static string PrettifyPage_DF_Certance(byte[] pageResponse) =>
PrettifyPage_DF_Certance(DecodePage_DF_Certance(pageResponse));
public static string PrettifyPage_DF_Certance(Page_DF_Certance? modePage)
{
@@ -2013,10 +1987,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C0_IBM(byte[] pageResponse)
{
return PrettifyPage_C0_IBM(DecodePage_C0_IBM(pageResponse));
}
public static string PrettifyPage_C0_IBM(byte[] pageResponse) =>
PrettifyPage_C0_IBM(DecodePage_C0_IBM(pageResponse));
public static string PrettifyPage_C0_IBM(Page_C0_IBM? modePage)
{
@@ -2084,10 +2056,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C1_IBM(byte[] pageResponse)
{
return PrettifyPage_C1_IBM(DecodePage_C1_IBM(pageResponse));
}
public static string PrettifyPage_C1_IBM(byte[] pageResponse) =>
PrettifyPage_C1_IBM(DecodePage_C1_IBM(pageResponse));
public static string PrettifyPage_C1_IBM(Page_C1_IBM? modePage)
{
@@ -2154,10 +2124,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_B0(byte[] pageResponse)
{
return PrettifyPage_B0(DecodePage_B0(pageResponse));
}
public static string PrettifyPage_B0(byte[] pageResponse) => PrettifyPage_B0(DecodePage_B0(pageResponse));
public static string PrettifyPage_B0(Page_B0? modePage)
{
@@ -2339,10 +2306,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C0_to_C5_HP(byte[] pageResponse)
{
return PrettifyPage_C0_to_C5_HP(DecodePage_C0_to_C5_HP(pageResponse));
}
public static string PrettifyPage_C0_to_C5_HP(byte[] pageResponse) =>
PrettifyPage_C0_to_C5_HP(DecodePage_C0_to_C5_HP(pageResponse));
public static string PrettifyPage_C0_to_C5_HP(Page_C0_to_C5_HP? modePage)
{
@@ -2442,10 +2407,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyPage_C0_Seagate(byte[] pageResponse)
{
return PrettifyPage_C0_Seagate(DecodePage_C0_Seagate(pageResponse));
}
public static string PrettifyPage_C0_Seagate(byte[] pageResponse) =>
PrettifyPage_C0_Seagate(DecodePage_C0_Seagate(pageResponse));
public static string PrettifyPage_C0_Seagate(Page_C0_Seagate? modePage)
{

View File

@@ -317,9 +317,9 @@ namespace DiscImageChef.Decoders.SCSI
public enum ScsiDefinitions : byte
{
Current = 0,
SCSI1 = 1,
CCS = 2,
SCSI2 = 3,
SCSI3 = 4
SCSI1 = 1,
CCS = 2,
SCSI2 = 3,
SCSI3 = 4
}
}

View File

@@ -67,7 +67,8 @@ namespace DiscImageChef.Decoders.SCSI
return null;
}
if(SCSIInquiryResponse.Length < SCSIInquiryResponse[4] + 5 && SCSIInquiryResponse.Length != SCSIInquiryResponse[4])
if(SCSIInquiryResponse.Length < SCSIInquiryResponse[4] + 5 &&
SCSIInquiryResponse.Length != SCSIInquiryResponse[4])
{
DicConsole.DebugWriteLine("SCSI INQUIRY decoder",
"INQUIRY response length ({0} bytes) is different than specified in length field ({1} bytes), decoded data can be incorrect, not decoding.",
@@ -357,19 +358,22 @@ namespace DiscImageChef.Decoders.SCSI
if(decoded.VendorIdentification != null)
{
length = 16;
Array.Copy(decoded.VendorIdentification, 0, buffer, 8, decoded.VendorIdentification.Length >= 8 ? 8 : decoded.VendorIdentification.Length);
Array.Copy(decoded.VendorIdentification, 0, buffer, 8,
decoded.VendorIdentification.Length >= 8 ? 8 : decoded.VendorIdentification.Length);
}
if(decoded.ProductIdentification != null)
{
length = 32;
Array.Copy(decoded.ProductIdentification, 0, buffer, 16, decoded.ProductIdentification.Length >= 16 ? 16 : decoded.ProductIdentification.Length);
Array.Copy(decoded.ProductIdentification, 0, buffer, 16,
decoded.ProductIdentification.Length >= 16 ? 16 : decoded.ProductIdentification.Length);
}
if(decoded.ProductRevisionLevel != null)
{
length = 36;
Array.Copy(decoded.ProductRevisionLevel, 0, buffer, 32, decoded.ProductRevisionLevel.Length >= 4 ? 4 : decoded.ProductRevisionLevel.Length);
Array.Copy(decoded.ProductRevisionLevel, 0, buffer, 32,
decoded.ProductRevisionLevel.Length >= 4 ? 4 : decoded.ProductRevisionLevel.Length);
}
if(decoded.Seagate_DriveSerialNumber != null)

View File

@@ -4132,12 +4132,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_001D(Feature_001D? feature)
{
return !feature.HasValue
? null
: "Drive claims capability to read all CD formats according to OSTA Multi-Read Specification\n";
}
public static string Prettify_001D(Feature_001D? feature) =>
!feature.HasValue
? null
: "Drive claims capability to read all CD formats according to OSTA Multi-Read Specification\n";
public static string Prettify_001E(Feature_001E? feature)
{
@@ -4235,10 +4233,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0022(Feature_0022? feature)
{
return !feature.HasValue ? null : "Drive supports media that require erasing before writing\n";
}
public static string Prettify_0022(Feature_0022? feature) =>
!feature.HasValue ? null : "Drive supports media that require erasing before writing\n";
public static string Prettify_0023(Feature_0023? feature)
{
@@ -4294,12 +4290,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0026(Feature_0026? feature)
{
return !feature.HasValue
? null
: "Drive shall have the ability to overwrite logical blocks only in fixed sets at a time\n";
}
public static string Prettify_0026(Feature_0026? feature) =>
!feature.HasValue
? null
: "Drive shall have the ability to overwrite logical blocks only in fixed sets at a time\n";
public static string Prettify_0027(Feature_0027? feature)
{
@@ -4510,10 +4504,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0030(Feature_0030? feature)
{
return !feature.HasValue ? null : "Drive can read DDCDs\n";
}
public static string Prettify_0030(Feature_0030? feature) =>
!feature.HasValue ? null : "Drive can read DDCDs\n";
public static string Prettify_0031(Feature_0031? feature)
{
@@ -4561,10 +4553,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0035(Feature_0035? feature)
{
return !feature.HasValue ? null : "Drive can stop a long immediate operation\n";
}
public static string Prettify_0035(Feature_0035? feature) =>
!feature.HasValue ? null : "Drive can stop a long immediate operation\n";
public static string Prettify_0037(Feature_0037? feature)
{
@@ -4590,10 +4580,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0038(Feature_0038? feature)
{
return !feature.HasValue ? null : "Drive can write BD-R on Pseudo-OVerwrite SRM mode\n";
}
public static string Prettify_0038(Feature_0038? feature) =>
!feature.HasValue ? null : "Drive can write BD-R on Pseudo-OVerwrite SRM mode\n";
public static string Prettify_003A(Feature_003A? feature)
{
@@ -4689,12 +4677,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0042(Feature_0042? feature)
{
return !feature.HasValue
? null
: "Drive is able to detect and report defective writable unit and behave accordinly\n";
}
public static string Prettify_0042(Feature_0042? feature) =>
!feature.HasValue
? null
: "Drive is able to detect and report defective writable unit and behave accordinly\n";
public static string Prettify_0050(Feature_0050? feature)
{
@@ -4749,10 +4735,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0100(Feature_0100? feature)
{
return !feature.HasValue ? null : "Drive is able to perform host and drive directed power management\n";
}
public static string Prettify_0100(Feature_0100? feature) =>
!feature.HasValue ? null : "Drive is able to perform host and drive directed power management\n";
public static string Prettify_0101(Feature_0101? feature)
{
@@ -4881,10 +4865,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0109(Feature_0109? feature)
{
return !feature.HasValue ? null : "Drive is able to read media serial number\n";
}
public static string Prettify_0109(Feature_0109? feature) =>
!feature.HasValue ? null : "Drive is able to read media serial number\n";
public static string Prettify_010A(Feature_010A? feature)
{
@@ -5059,295 +5041,121 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return sb.ToString();
}
public static string Prettify_0000(byte[] feature)
{
return Prettify_0000(Decode_0000(feature));
}
public static string Prettify_0000(byte[] feature) => Prettify_0000(Decode_0000(feature));
public static string Prettify_0001(byte[] feature)
{
return Prettify_0001(Decode_0001(feature));
}
public static string Prettify_0001(byte[] feature) => Prettify_0001(Decode_0001(feature));
public static string Prettify_0002(byte[] feature)
{
return Prettify_0002(Decode_0002(feature));
}
public static string Prettify_0002(byte[] feature) => Prettify_0002(Decode_0002(feature));
public static string Prettify_0003(byte[] feature)
{
return Prettify_0003(Decode_0003(feature));
}
public static string Prettify_0003(byte[] feature) => Prettify_0003(Decode_0003(feature));
public static string Prettify_0004(byte[] feature)
{
return Prettify_0004(Decode_0004(feature));
}
public static string Prettify_0004(byte[] feature) => Prettify_0004(Decode_0004(feature));
public static string Prettify_0010(byte[] feature)
{
return Prettify_0010(Decode_0010(feature));
}
public static string Prettify_0010(byte[] feature) => Prettify_0010(Decode_0010(feature));
public static string Prettify_001D(byte[] feature)
{
return Prettify_001D(Decode_001D(feature));
}
public static string Prettify_001D(byte[] feature) => Prettify_001D(Decode_001D(feature));
public static string Prettify_001E(byte[] feature)
{
return Prettify_001E(Decode_001E(feature));
}
public static string Prettify_001E(byte[] feature) => Prettify_001E(Decode_001E(feature));
public static string Prettify_001F(byte[] feature)
{
return Prettify_001F(Decode_001F(feature));
}
public static string Prettify_001F(byte[] feature) => Prettify_001F(Decode_001F(feature));
public static string Prettify_0020(byte[] feature)
{
return Prettify_0020(Decode_0020(feature));
}
public static string Prettify_0020(byte[] feature) => Prettify_0020(Decode_0020(feature));
public static string Prettify_0021(byte[] feature)
{
return Prettify_0021(Decode_0021(feature));
}
public static string Prettify_0021(byte[] feature) => Prettify_0021(Decode_0021(feature));
public static string Prettify_0022(byte[] feature)
{
return Prettify_0022(Decode_0022(feature));
}
public static string Prettify_0022(byte[] feature) => Prettify_0022(Decode_0022(feature));
public static string Prettify_0023(byte[] feature)
{
return Prettify_0023(Decode_0023(feature));
}
public static string Prettify_0023(byte[] feature) => Prettify_0023(Decode_0023(feature));
public static string Prettify_0024(byte[] feature)
{
return Prettify_0024(Decode_0024(feature));
}
public static string Prettify_0024(byte[] feature) => Prettify_0024(Decode_0024(feature));
public static string Prettify_0025(byte[] feature)
{
return Prettify_0025(Decode_0025(feature));
}
public static string Prettify_0025(byte[] feature) => Prettify_0025(Decode_0025(feature));
public static string Prettify_0026(byte[] feature)
{
return Prettify_0026(Decode_0026(feature));
}
public static string Prettify_0026(byte[] feature) => Prettify_0026(Decode_0026(feature));
public static string Prettify_0027(byte[] feature)
{
return Prettify_0027(Decode_0027(feature));
}
public static string Prettify_0027(byte[] feature) => Prettify_0027(Decode_0027(feature));
public static string Prettify_0028(byte[] feature)
{
return Prettify_0028(Decode_0028(feature));
}
public static string Prettify_0028(byte[] feature) => Prettify_0028(Decode_0028(feature));
public static string Prettify_0029(byte[] feature)
{
return Prettify_0029(Decode_0029(feature));
}
public static string Prettify_0029(byte[] feature) => Prettify_0029(Decode_0029(feature));
public static string Prettify_002A(byte[] feature)
{
return Prettify_002A(Decode_002A(feature));
}
public static string Prettify_002A(byte[] feature) => Prettify_002A(Decode_002A(feature));
public static string Prettify_002B(byte[] feature)
{
return Prettify_002B(Decode_002B(feature));
}
public static string Prettify_002B(byte[] feature) => Prettify_002B(Decode_002B(feature));
public static string Prettify_002C(byte[] feature)
{
return Prettify_002C(Decode_002C(feature));
}
public static string Prettify_002C(byte[] feature) => Prettify_002C(Decode_002C(feature));
public static string Prettify_002D(byte[] feature)
{
return Prettify_002D(Decode_002D(feature));
}
public static string Prettify_002D(byte[] feature) => Prettify_002D(Decode_002D(feature));
public static string Prettify_002E(byte[] feature)
{
return Prettify_002E(Decode_002E(feature));
}
public static string Prettify_002E(byte[] feature) => Prettify_002E(Decode_002E(feature));
public static string Prettify_002F(byte[] feature)
{
return Prettify_002F(Decode_002F(feature));
}
public static string Prettify_002F(byte[] feature) => Prettify_002F(Decode_002F(feature));
public static string Prettify_0030(byte[] feature)
{
return Prettify_0030(Decode_0030(feature));
}
public static string Prettify_0030(byte[] feature) => Prettify_0030(Decode_0030(feature));
public static string Prettify_0031(byte[] feature)
{
return Prettify_0031(Decode_0031(feature));
}
public static string Prettify_0031(byte[] feature) => Prettify_0031(Decode_0031(feature));
public static string Prettify_0032(byte[] feature)
{
return Prettify_0032(Decode_0032(feature));
}
public static string Prettify_0032(byte[] feature) => Prettify_0032(Decode_0032(feature));
public static string Prettify_0033(byte[] feature)
{
return Prettify_0033(Decode_0033(feature));
}
public static string Prettify_0033(byte[] feature) => Prettify_0033(Decode_0033(feature));
public static string Prettify_0035(byte[] feature)
{
return Prettify_0035(Decode_0035(feature));
}
public static string Prettify_0035(byte[] feature) => Prettify_0035(Decode_0035(feature));
public static string Prettify_0037(byte[] feature)
{
return Prettify_0037(Decode_0037(feature));
}
public static string Prettify_0037(byte[] feature) => Prettify_0037(Decode_0037(feature));
public static string Prettify_0038(byte[] feature)
{
return Prettify_0038(Decode_0038(feature));
}
public static string Prettify_0038(byte[] feature) => Prettify_0038(Decode_0038(feature));
public static string Prettify_003A(byte[] feature)
{
return Prettify_003A(Decode_003A(feature));
}
public static string Prettify_003A(byte[] feature) => Prettify_003A(Decode_003A(feature));
public static string Prettify_003B(byte[] feature)
{
return Prettify_003B(Decode_003B(feature));
}
public static string Prettify_003B(byte[] feature) => Prettify_003B(Decode_003B(feature));
public static string Prettify_0040(byte[] feature)
{
return Prettify_0040(Decode_0040(feature));
}
public static string Prettify_0040(byte[] feature) => Prettify_0040(Decode_0040(feature));
public static string Prettify_0041(byte[] feature)
{
return Prettify_0041(Decode_0041(feature));
}
public static string Prettify_0041(byte[] feature) => Prettify_0041(Decode_0041(feature));
public static string Prettify_0042(byte[] feature)
{
return Prettify_0042(Decode_0042(feature));
}
public static string Prettify_0042(byte[] feature) => Prettify_0042(Decode_0042(feature));
public static string Prettify_0050(byte[] feature)
{
return Prettify_0050(Decode_0050(feature));
}
public static string Prettify_0050(byte[] feature) => Prettify_0050(Decode_0050(feature));
public static string Prettify_0051(byte[] feature)
{
return Prettify_0051(Decode_0051(feature));
}
public static string Prettify_0051(byte[] feature) => Prettify_0051(Decode_0051(feature));
public static string Prettify_0080(byte[] feature)
{
return Prettify_0080(Decode_0080(feature));
}
public static string Prettify_0080(byte[] feature) => Prettify_0080(Decode_0080(feature));
public static string Prettify_0100(byte[] feature)
{
return Prettify_0100(Decode_0100(feature));
}
public static string Prettify_0100(byte[] feature) => Prettify_0100(Decode_0100(feature));
public static string Prettify_0101(byte[] feature)
{
return Prettify_0101(Decode_0101(feature));
}
public static string Prettify_0101(byte[] feature) => Prettify_0101(Decode_0101(feature));
public static string Prettify_0102(byte[] feature)
{
return Prettify_0102(Decode_0102(feature));
}
public static string Prettify_0102(byte[] feature) => Prettify_0102(Decode_0102(feature));
public static string Prettify_0103(byte[] feature)
{
return Prettify_0103(Decode_0103(feature));
}
public static string Prettify_0103(byte[] feature) => Prettify_0103(Decode_0103(feature));
public static string Prettify_0104(byte[] feature)
{
return Prettify_0104(Decode_0104(feature));
}
public static string Prettify_0104(byte[] feature) => Prettify_0104(Decode_0104(feature));
public static string Prettify_0105(byte[] feature)
{
return Prettify_0105(Decode_0105(feature));
}
public static string Prettify_0105(byte[] feature) => Prettify_0105(Decode_0105(feature));
public static string Prettify_0106(byte[] feature)
{
return Prettify_0106(Decode_0106(feature));
}
public static string Prettify_0106(byte[] feature) => Prettify_0106(Decode_0106(feature));
public static string Prettify_0107(byte[] feature)
{
return Prettify_0107(Decode_0107(feature));
}
public static string Prettify_0107(byte[] feature) => Prettify_0107(Decode_0107(feature));
public static string Prettify_0108(byte[] feature)
{
return Prettify_0108(Decode_0108(feature));
}
public static string Prettify_0108(byte[] feature) => Prettify_0108(Decode_0108(feature));
public static string Prettify_0109(byte[] feature)
{
return Prettify_0109(Decode_0109(feature));
}
public static string Prettify_0109(byte[] feature) => Prettify_0109(Decode_0109(feature));
public static string Prettify_010A(byte[] feature)
{
return Prettify_010A(Decode_010A(feature));
}
public static string Prettify_010A(byte[] feature) => Prettify_010A(Decode_010A(feature));
public static string Prettify_010B(byte[] feature)
{
return Prettify_010B(Decode_010B(feature));
}
public static string Prettify_010B(byte[] feature) => Prettify_010B(Decode_010B(feature));
public static string Prettify_010C(byte[] feature)
{
return Prettify_010C(Decode_010C(feature));
}
public static string Prettify_010C(byte[] feature) => Prettify_010C(Decode_010C(feature));
public static string Prettify_010D(byte[] feature)
{
return Prettify_010D(Decode_010D(feature));
}
public static string Prettify_010D(byte[] feature) => Prettify_010D(Decode_010D(feature));
public static string Prettify_010E(byte[] feature)
{
return Prettify_010E(Decode_010E(feature));
}
public static string Prettify_010E(byte[] feature) => Prettify_010E(Decode_010E(feature));
public static string Prettify_0110(byte[] feature)
{
return Prettify_0110(Decode_0110(feature));
}
public static string Prettify_0110(byte[] feature) => Prettify_0110(Decode_0110(feature));
public static string Prettify_0113(byte[] feature)
{
return Prettify_0113(Decode_0113(feature));
}
public static string Prettify_0113(byte[] feature) => Prettify_0113(Decode_0113(feature));
public static string Prettify_0142(byte[] feature)
{
return Prettify_0142(Decode_0142(feature));
}
public static string Prettify_0142(byte[] feature) => Prettify_0142(Decode_0142(feature));
public static SeparatedFeatures Separate(byte[] response)
{

View File

@@ -93,10 +93,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_00_SFF(byte[] pageResponse)
{
return PrettifyModePage_00_SFF(DecodeModePage_00_SFF(pageResponse));
}
public static string PrettifyModePage_00_SFF(byte[] pageResponse) =>
PrettifyModePage_00_SFF(DecodeModePage_00_SFF(pageResponse));
public static string PrettifyModePage_00_SFF(ModePage_00_SFF? modePage)
{

View File

@@ -151,10 +151,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_01(byte[] pageResponse)
{
return PrettifyModePage_01(DecodeModePage_01(pageResponse));
}
public static string PrettifyModePage_01(byte[] pageResponse) =>
PrettifyModePage_01(DecodeModePage_01(pageResponse));
public static string PrettifyModePage_01(ModePage_01? modePage)
{

View File

@@ -95,10 +95,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_01_MMC(byte[] pageResponse)
{
return PrettifyModePage_01_MMC(DecodeModePage_01_MMC(pageResponse));
}
public static string PrettifyModePage_01_MMC(byte[] pageResponse) =>
PrettifyModePage_01_MMC(DecodeModePage_01_MMC(pageResponse));
public static string PrettifyModePage_01_MMC(ModePage_01_MMC? modePage)
{

View File

@@ -133,10 +133,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_02(byte[] pageResponse)
{
return PrettifyModePage_02(DecodeModePage_02(pageResponse));
}
public static string PrettifyModePage_02(byte[] pageResponse) =>
PrettifyModePage_02(DecodeModePage_02(pageResponse));
public static string PrettifyModePage_02(ModePage_02? modePage)
{

View File

@@ -137,10 +137,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_03(byte[] pageResponse)
{
return PrettifyModePage_03(DecodeModePage_03(pageResponse));
}
public static string PrettifyModePage_03(byte[] pageResponse) =>
PrettifyModePage_03(DecodeModePage_03(pageResponse));
public static string PrettifyModePage_03(ModePage_03? modePage)
{

View File

@@ -120,10 +120,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_04(byte[] pageResponse)
{
return PrettifyModePage_04(DecodeModePage_04(pageResponse));
}
public static string PrettifyModePage_04(byte[] pageResponse) =>
PrettifyModePage_04(DecodeModePage_04(pageResponse));
public static string PrettifyModePage_04(ModePage_04? modePage)
{

View File

@@ -196,10 +196,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_05(byte[] pageResponse)
{
return PrettifyModePage_05(DecodeModePage_05(pageResponse));
}
public static string PrettifyModePage_05(byte[] pageResponse) =>
PrettifyModePage_05(DecodeModePage_05(pageResponse));
public static string PrettifyModePage_05(ModePage_05? modePage)
{

View File

@@ -76,10 +76,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_06(byte[] pageResponse)
{
return PrettifyModePage_06(DecodeModePage_06(pageResponse));
}
public static string PrettifyModePage_06(byte[] pageResponse) =>
PrettifyModePage_06(DecodeModePage_06(pageResponse));
public static string PrettifyModePage_06(ModePage_06? modePage)
{

View File

@@ -108,10 +108,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_07(byte[] pageResponse)
{
return PrettifyModePage_07(DecodeModePage_07(pageResponse));
}
public static string PrettifyModePage_07(byte[] pageResponse) =>
PrettifyModePage_07(DecodeModePage_07(pageResponse));
public static string PrettifyModePage_07(ModePage_07? modePage)
{

View File

@@ -81,10 +81,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_07_MMC(byte[] pageResponse)
{
return PrettifyModePage_07_MMC(DecodeModePage_07_MMC(pageResponse));
}
public static string PrettifyModePage_07_MMC(byte[] pageResponse) =>
PrettifyModePage_07_MMC(DecodeModePage_07_MMC(pageResponse));
public static string PrettifyModePage_07_MMC(ModePage_07_MMC? modePage)
{

View File

@@ -183,10 +183,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_08(byte[] pageResponse)
{
return PrettifyModePage_08(DecodeModePage_08(pageResponse));
}
public static string PrettifyModePage_08(byte[] pageResponse) =>
PrettifyModePage_08(DecodeModePage_08(pageResponse));
public static string PrettifyModePage_08(ModePage_08? modePage)
{

View File

@@ -223,10 +223,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_0A(byte[] pageResponse)
{
return PrettifyModePage_0A(DecodeModePage_0A(pageResponse));
}
public static string PrettifyModePage_0A(byte[] pageResponse) =>
PrettifyModePage_0A(DecodeModePage_0A(pageResponse));
public static string PrettifyModePage_0A(ModePage_0A? modePage)
{
@@ -420,10 +418,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_0A_S01(byte[] pageResponse)
{
return PrettifyModePage_0A_S01(DecodeModePage_0A_S01(pageResponse));
}
public static string PrettifyModePage_0A_S01(byte[] pageResponse) =>
PrettifyModePage_0A_S01(DecodeModePage_0A_S01(pageResponse));
public static string PrettifyModePage_0A_S01(ModePage_0A_S01? modePage)
{

View File

@@ -79,10 +79,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_0B(byte[] pageResponse)
{
return PrettifyModePage_0B(DecodeModePage_0B(pageResponse));
}
public static string PrettifyModePage_0B(byte[] pageResponse) =>
PrettifyModePage_0B(DecodeModePage_0B(pageResponse));
public static string PrettifyModePage_0B(ModePage_0B? modePage)
{

View File

@@ -86,10 +86,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_0D(byte[] pageResponse)
{
return PrettifyModePage_0D(DecodeModePage_0D(pageResponse));
}
public static string PrettifyModePage_0D(byte[] pageResponse) =>
PrettifyModePage_0D(DecodeModePage_0D(pageResponse));
public static string PrettifyModePage_0D(ModePage_0D? modePage)
{

View File

@@ -136,10 +136,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_0E(byte[] pageResponse)
{
return PrettifyModePage_0E(DecodeModePage_0E(pageResponse));
}
public static string PrettifyModePage_0E(byte[] pageResponse) =>
PrettifyModePage_0E(DecodeModePage_0E(pageResponse));
public static string PrettifyModePage_0E(ModePage_0E? modePage)
{

View File

@@ -105,10 +105,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_0F(byte[] pageResponse)
{
return PrettifyModePage_0F(DecodeModePage_0F(pageResponse));
}
public static string PrettifyModePage_0F(byte[] pageResponse) =>
PrettifyModePage_0F(DecodeModePage_0F(pageResponse));
public static string PrettifyModePage_0F(ModePage_0F? modePage)
{

View File

@@ -100,10 +100,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_10(byte[] pageResponse)
{
return PrettifyModePage_10(DecodeModePage_10(pageResponse));
}
public static string PrettifyModePage_10(byte[] pageResponse) =>
PrettifyModePage_10(DecodeModePage_10(pageResponse));
public static string PrettifyModePage_10(ModePage_10? modePage)
{

View File

@@ -213,10 +213,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_10_SSC(byte[] pageResponse)
{
return PrettifyModePage_10_SSC(DecodeModePage_10_SSC(pageResponse));
}
public static string PrettifyModePage_10_SSC(byte[] pageResponse) =>
PrettifyModePage_10_SSC(DecodeModePage_10_SSC(pageResponse));
public static string PrettifyModePage_10_SSC(ModePage_10_SSC? modePage)
{

View File

@@ -166,10 +166,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_11(byte[] pageResponse)
{
return PrettifyModePage_11(DecodeModePage_11(pageResponse));
}
public static string PrettifyModePage_11(byte[] pageResponse) =>
PrettifyModePage_11(DecodeModePage_11(pageResponse));
public static string PrettifyModePage_11(ModePage_11? modePage)
{

View File

@@ -85,10 +85,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_12_13_14(byte[] pageResponse)
{
return PrettifyModePage_12_13_14(DecodeModePage_12_13_14(pageResponse));
}
public static string PrettifyModePage_12_13_14(byte[] pageResponse) =>
PrettifyModePage_12_13_14(DecodeModePage_12_13_14(pageResponse));
public static string PrettifyModePage_12_13_14(ModePage_12_13_14? modePage)
{

View File

@@ -146,10 +146,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1A(byte[] pageResponse)
{
return PrettifyModePage_1A(DecodeModePage_1A(pageResponse));
}
public static string PrettifyModePage_1A(byte[] pageResponse) =>
PrettifyModePage_1A(DecodeModePage_1A(pageResponse));
public static string PrettifyModePage_1A(ModePage_1A? modePage)
{
@@ -242,10 +240,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1A_S01(byte[] pageResponse)
{
return PrettifyModePage_1A_S01(DecodeModePage_1A_S01(pageResponse));
}
public static string PrettifyModePage_1A_S01(byte[] pageResponse) =>
PrettifyModePage_1A_S01(DecodeModePage_1A_S01(pageResponse));
public static string PrettifyModePage_1A_S01(ModePage_1A_S01? modePage)
{

View File

@@ -97,10 +97,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1B(byte[] pageResponse)
{
return PrettifyModePage_1B(DecodeModePage_1B(pageResponse));
}
public static string PrettifyModePage_1B(byte[] pageResponse) =>
PrettifyModePage_1B(DecodeModePage_1B(pageResponse));
public static string PrettifyModePage_1B(ModePage_1B? modePage)
{

View File

@@ -132,10 +132,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1C(byte[] pageResponse)
{
return PrettifyModePage_1C(DecodeModePage_1C(pageResponse));
}
public static string PrettifyModePage_1C(byte[] pageResponse) =>
PrettifyModePage_1C(DecodeModePage_1C(pageResponse));
public static string PrettifyModePage_1C(ModePage_1C? modePage)
{
@@ -280,10 +278,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1C_S01(byte[] pageResponse)
{
return PrettifyModePage_1C_S01(DecodeModePage_1C_S01(pageResponse));
}
public static string PrettifyModePage_1C_S01(byte[] pageResponse) =>
PrettifyModePage_1C_S01(DecodeModePage_1C_S01(pageResponse));
public static string PrettifyModePage_1C_S01(ModePage_1C_S01? modePage)
{

View File

@@ -87,10 +87,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1C_SFF(byte[] pageResponse)
{
return PrettifyModePage_1C_SFF(DecodeModePage_1C_SFF(pageResponse));
}
public static string PrettifyModePage_1C_SFF(byte[] pageResponse) =>
PrettifyModePage_1C_SFF(DecodeModePage_1C_SFF(pageResponse));
public static string PrettifyModePage_1C_SFF(ModePage_1C_SFF? modePage)
{

View File

@@ -72,10 +72,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyModePage_1D(byte[] pageResponse)
{
return PrettifyModePage_1D(DecodeModePage_1D(pageResponse));
}
public static string PrettifyModePage_1D(byte[] pageResponse) =>
PrettifyModePage_1D(DecodeModePage_1D(pageResponse));
public static string PrettifyModePage_1D(ModePage_1D? modePage)
{

View File

@@ -82,10 +82,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyCertanceModePage_21(byte[] pageResponse)
{
return PrettifyCertanceModePage_21(DecodeCertanceModePage_21(pageResponse));
}
public static string PrettifyCertanceModePage_21(byte[] pageResponse) =>
PrettifyCertanceModePage_21(DecodeCertanceModePage_21(pageResponse));
public static string PrettifyCertanceModePage_21(Certance_ModePage_21? modePage)
{

View File

@@ -89,10 +89,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyCertanceModePage_22(byte[] pageResponse)
{
return PrettifyCertanceModePage_22(DecodeCertanceModePage_22(pageResponse));
}
public static string PrettifyCertanceModePage_22(byte[] pageResponse) =>
PrettifyCertanceModePage_22(DecodeCertanceModePage_22(pageResponse));
public static string PrettifyCertanceModePage_22(Certance_ModePage_22? modePage)
{

View File

@@ -74,10 +74,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyIBMModePage_24(byte[] pageResponse)
{
return PrettifyIBMModePage_24(DecodeIBMModePage_24(pageResponse));
}
public static string PrettifyIBMModePage_24(byte[] pageResponse) =>
PrettifyIBMModePage_24(DecodeIBMModePage_24(pageResponse));
public static string PrettifyIBMModePage_24(IBM_ModePage_24? modePage)
{

View File

@@ -422,10 +422,8 @@ namespace DiscImageChef.Decoders.SCSI
return buf;
}
public static string PrettifyModePage_2A(byte[] pageResponse)
{
return PrettifyModePage_2A(DecodeModePage_2A(pageResponse));
}
public static string PrettifyModePage_2A(byte[] pageResponse) =>
PrettifyModePage_2A(DecodeModePage_2A(pageResponse));
public static string PrettifyModePage_2A(ModePage_2A modePage)
{

View File

@@ -87,10 +87,8 @@ namespace DiscImageChef.Decoders.SCSI
};
}
public static string PrettifyIBMModePage_2F(byte[] pageResponse)
{
return PrettifyIBMModePage_2F(DecodeIBMModePage_2F(pageResponse));
}
public static string PrettifyIBMModePage_2F(byte[] pageResponse) =>
PrettifyIBMModePage_2F(DecodeIBMModePage_2F(pageResponse));
public static string PrettifyIBMModePage_2F(IBM_ModePage_2F? modePage)
{

View File

@@ -44,8 +44,8 @@ namespace DiscImageChef.Decoders.SCSI
#region Apple Mode Page 0x30: Apple OEM String
static readonly byte[] AppleOEMString =
{
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E,
0x43, 0x2E
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49,
0x4E, 0x43, 0x2E
};
public static bool IsAppleModePage_30(byte[] pageResponse)

View File

@@ -72,10 +72,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyHPModePage_3B(byte[] pageResponse)
{
return PrettifyHPModePage_3B(DecodeHPModePage_3B(pageResponse));
}
public static string PrettifyHPModePage_3B(byte[] pageResponse) =>
PrettifyHPModePage_3B(DecodeHPModePage_3B(pageResponse));
public static string PrettifyHPModePage_3B(HP_ModePage_3B? modePage)
{

View File

@@ -94,10 +94,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyHPModePage_3C(byte[] pageResponse)
{
return PrettifyHPModePage_3C(DecodeHPModePage_3C(pageResponse));
}
public static string PrettifyHPModePage_3C(byte[] pageResponse) =>
PrettifyHPModePage_3C(DecodeHPModePage_3C(pageResponse));
public static string PrettifyHPModePage_3C(HP_ModePage_3C? modePage)
{

View File

@@ -68,10 +68,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyHPModePage_3D(byte[] pageResponse)
{
return PrettifyHPModePage_3D(DecodeHPModePage_3D(pageResponse));
}
public static string PrettifyHPModePage_3D(byte[] pageResponse) =>
PrettifyHPModePage_3D(DecodeHPModePage_3D(pageResponse));
public static string PrettifyHPModePage_3D(HP_ModePage_3D? modePage)
{

View File

@@ -68,10 +68,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyIBMModePage_3D(byte[] pageResponse)
{
return PrettifyIBMModePage_3D(DecodeIBMModePage_3D(pageResponse));
}
public static string PrettifyIBMModePage_3D(byte[] pageResponse) =>
PrettifyIBMModePage_3D(DecodeIBMModePage_3D(pageResponse));
public static string PrettifyIBMModePage_3D(IBM_ModePage_3D? modePage)
{

View File

@@ -115,10 +115,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyFujitsuModePage_3E(byte[] pageResponse)
{
return PrettifyFujitsuModePage_3E(DecodeFujitsuModePage_3E(pageResponse));
}
public static string PrettifyFujitsuModePage_3E(byte[] pageResponse) =>
PrettifyFujitsuModePage_3E(DecodeFujitsuModePage_3E(pageResponse));
public static string PrettifyFujitsuModePage_3E(Fujitsu_ModePage_3E? modePage)
{

View File

@@ -70,10 +70,8 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifyHPModePage_3E(byte[] pageResponse)
{
return PrettifyHPModePage_3E(DecodeHPModePage_3E(pageResponse));
}
public static string PrettifyHPModePage_3E(byte[] pageResponse) =>
PrettifyHPModePage_3E(DecodeHPModePage_3E(pageResponse));
public static string PrettifyHPModePage_3E(HP_ModePage_3E? modePage)
{

View File

@@ -130,10 +130,8 @@ namespace DiscImageChef.Decoders.SCSI
return header;
}
public static string PrettifyModeHeader10(byte[] modeResponse, PeripheralDeviceTypes deviceType)
{
return PrettifyModeHeader(DecodeModeHeader10(modeResponse, deviceType), deviceType);
}
public static string PrettifyModeHeader10(byte[] modeResponse, PeripheralDeviceTypes deviceType) =>
PrettifyModeHeader(DecodeModeHeader10(modeResponse, deviceType), deviceType);
public static DecodedMode? DecodeMode10(byte[] modeResponse, PeripheralDeviceTypes deviceType)
{

View File

@@ -89,10 +89,8 @@ namespace DiscImageChef.Decoders.SCSI
return header;
}
public static string PrettifyModeHeader6(byte[] modeResponse, PeripheralDeviceTypes deviceType)
{
return PrettifyModeHeader(DecodeModeHeader6(modeResponse, deviceType), deviceType);
}
public static string PrettifyModeHeader6(byte[] modeResponse, PeripheralDeviceTypes deviceType) =>
PrettifyModeHeader(DecodeModeHeader6(modeResponse, deviceType), deviceType);
public static DecodedMode? DecodeMode6(byte[] modeResponse, PeripheralDeviceTypes deviceType)
{

View File

@@ -92,9 +92,6 @@ namespace DiscImageChef.Decoders.SCSI.SSC
return sb.ToString();
}
public static string Prettify(byte[] response)
{
return Prettify(Decode(response));
}
public static string Prettify(byte[] response) => Prettify(Decode(response));
}
}

View File

@@ -115,17 +115,12 @@ namespace DiscImageChef.Decoders.SCSI.SSC
duplicate = (response[offset + 2] & 0x40) == 0x40,
defaultDensity = (response[offset + 2] & 0x20) == 0x20,
reserved = (byte)((response[offset + 2] & 0x1E) >> 1),
lenvalid =
(response[offset + 2] &
0x01) == 0x01,
len =
(ushort)((response[offset + 3] << 8) + response[offset + 4]),
lenvalid = (response[offset + 2] & 0x01) == 0x01,
len = (ushort)((response[offset + 3] << 8) + response[offset + 4]),
bpmm =
(uint)((response[offset + 5] << 16) + (response[offset + 6] << 8) + response[offset + 7]),
width =
(ushort)((response[offset + 8] << 8) + response[offset + 9]),
tracks =
(ushort)((response[offset + 10] << 8) + response[offset + 11]),
width = (ushort)((response[offset + 8] << 8) + response[offset + 9]),
tracks = (ushort)((response[offset + 10] << 8) + response[offset + 11]),
capacity = (uint)((response[offset + 12] << 24) + (response[offset + 13] << 16) +
(response[offset + 14] << 8) + response[offset + 15])
};
@@ -182,10 +177,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
return sb.ToString();
}
public static string PrettifyDensity(byte[] response)
{
return PrettifyDensity(DecodeDensity(response));
}
public static string PrettifyDensity(byte[] response) => PrettifyDensity(DecodeDensity(response));
public static MediaTypeSupportHeader? DecodeMediumType(byte[] response)
{
@@ -272,9 +264,6 @@ namespace DiscImageChef.Decoders.SCSI.SSC
return sb.ToString();
}
public static string PrettifyMediumType(byte[] response)
{
return PrettifyMediumType(DecodeMediumType(response));
}
public static string PrettifyMediumType(byte[] response) => PrettifyMediumType(DecodeMediumType(response));
}
}

View File

@@ -279,10 +279,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static FixedSense? DecodeFixed(byte[] sense)
{
return DecodeFixed(sense, out _);
}
public static FixedSense? DecodeFixed(byte[] sense) => DecodeFixed(sense, out _);
public static FixedSense? DecodeFixed(byte[] sense, out string senseDescription)
{
@@ -325,10 +322,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static DescriptorSense? DecodeDescriptor(byte[] sense)
{
return DecodeDescriptor(sense, out _);
}
public static DescriptorSense? DecodeDescriptor(byte[] sense) => DecodeDescriptor(sense, out _);
public static DescriptorSense? DecodeDescriptor(byte[] sense, out string senseDescription)
{
@@ -586,9 +580,8 @@ namespace DiscImageChef.Decoders.SCSI
throw new NotImplementedException("Check OSD");
}
public static AtaErrorRegistersLba48 DecodeDescriptor09(byte[] descriptor)
{
return new AtaErrorRegistersLba48
public static AtaErrorRegistersLba48 DecodeDescriptor09(byte[] descriptor) =>
new AtaErrorRegistersLba48
{
Error = descriptor[3],
SectorCount = (ushort)((descriptor[4] << 8) + descriptor[5]),
@@ -598,7 +591,6 @@ namespace DiscImageChef.Decoders.SCSI
DeviceHead = descriptor[12],
Status = descriptor[13]
};
}
public static void DecodeDescriptor0B(byte[] descriptor)
{
@@ -610,15 +602,10 @@ namespace DiscImageChef.Decoders.SCSI
throw new NotImplementedException("Check SBC-3");
}
public static string PrettifyDescriptor00(ulong information)
{
return $"On logical block {information}\n";
}
public static string PrettifyDescriptor00(ulong information) => $"On logical block {information}\n";
public static string PrettifyDescriptor00(byte[] descriptor)
{
return PrettifyDescriptor00(DecodeDescriptor00(descriptor));
}
public static string PrettifyDescriptor00(byte[] descriptor) =>
PrettifyDescriptor00(DecodeDescriptor00(descriptor));
public static string GetSenseKey(SenseKeys key)
{