From ac1ba762538212f3cf46ac54e904dcef0fcaba7f Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 31 Oct 2015 02:34:45 +0000 Subject: [PATCH] Added information from SSC-1 --- ChangeLog | 5 +++++ SCSI/Modes.cs | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4d7b58f8a..6d2296537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-10-31 Natalia Portillo + + * SCSI/Modes.cs: + Added information from SSC-1 + 2015-10-31 Natalia Portillo * SCSI/Modes.cs: diff --git a/SCSI/Modes.cs b/SCSI/Modes.cs index 405bc3afd..b317e63a4 100644 --- a/SCSI/Modes.cs +++ b/SCSI/Modes.cs @@ -2875,7 +2875,7 @@ namespace DiscImageChef.Decoders.SCSI /// /// Device configuration page /// Page code 0x10 - /// 16 bytes in SCSI-2 + /// 16 bytes in SCSI-2, SSC-1 /// public struct ModePage_10_SSC { @@ -2963,6 +2963,23 @@ namespace DiscImageChef.Decoders.SCSI /// Selected data compression algorithm /// public byte SelectedCompression; + + /// + /// Soft write protect + /// + public bool SWP; + /// + /// Associated write protect + /// + public bool ASOCWP; + /// + /// Persistent write protect + /// + public bool PERSWP; + /// + /// Permanent write protect + /// + public bool PRMWP; } public static ModePage_10_SSC? DecodeModePage_10_SSC(byte[] pageResponse) @@ -3004,6 +3021,11 @@ namespace DiscImageChef.Decoders.SCSI decoded.BufferSizeEarlyWarning = (uint)((pageResponse[11] << 16) + (pageResponse[12] << 8) + pageResponse[13]); decoded.SelectedCompression = pageResponse[14]; + decoded.SWP |= (pageResponse[10] & 0x04) == 0x04; + decoded.ASOCWP |= (pageResponse[15] & 0x04) == 0x04; + decoded.PERSWP |= (pageResponse[15] & 0x02) == 0x02; + decoded.PRMWP |= (pageResponse[15] & 0x01) == 0x01; + return decoded; } @@ -3109,6 +3131,15 @@ namespace DiscImageChef.Decoders.SCSI break; } + if (page.SWP) + sb.AppendLine("\tSoftware write protect is enabled"); + if (page.ASOCWP) + sb.AppendLine("\tAssociated write protect is enabled"); + if (page.PERSWP) + sb.AppendLine("\tPersistent write protect is enabled"); + if (page.PRMWP) + sb.AppendLine("\tPermanent write protect is enabled"); + return sb.ToString(); } #endregion Mode Page 0x10: Device configuration page