mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Use preferred braces style.
This commit is contained in:
@@ -269,14 +269,12 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(page.Size)
|
if(page.Size)
|
||||||
{
|
{
|
||||||
if(page.CacheSegmentSize > 0)
|
if(page.CacheSegmentSize > 0)
|
||||||
{
|
|
||||||
if(page.LBCSS)
|
if(page.LBCSS)
|
||||||
sb.AppendFormat("\tDrive cache segments should be {0} blocks long", page.CacheSegmentSize)
|
sb.AppendFormat("\tDrive cache segments should be {0} blocks long", page.CacheSegmentSize)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tDrive cache segments should be {0} bytes long", page.CacheSegmentSize)
|
sb.AppendFormat("\tDrive cache segments should be {0} bytes long", page.CacheSegmentSize)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -338,13 +338,11 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
page.ReadyAENHoldOffPeriod).AppendLine();
|
page.ReadyAENHoldOffPeriod).AppendLine();
|
||||||
|
|
||||||
if(page.BusyTimeoutPeriod > 0)
|
if(page.BusyTimeoutPeriod > 0)
|
||||||
{
|
|
||||||
if(page.BusyTimeoutPeriod == 0xFFFF)
|
if(page.BusyTimeoutPeriod == 0xFFFF)
|
||||||
sb.AppendLine("\tThere is no limit on the maximum time that is allowed to remain busy");
|
sb.AppendLine("\tThere is no limit on the maximum time that is allowed to remain busy");
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tA maximum of {0} ms are allowed to remain busy", page.BusyTimeoutPeriod * 100)
|
sb.AppendFormat("\tA maximum of {0} ms are allowed to remain busy", page.BusyTimeoutPeriod * 100)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
|
||||||
|
|
||||||
if(page.ExtendedSelfTestCompletionTime > 0)
|
if(page.ExtendedSelfTestCompletionTime > 0)
|
||||||
sb.AppendFormat("\t{0} seconds to complete extended self-test", page.ExtendedSelfTestCompletionTime);
|
sb.AppendFormat("\t{0} seconds to complete extended self-test", page.ExtendedSelfTestCompletionTime);
|
||||||
|
|||||||
@@ -315,10 +315,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(page.PRMWP) sb.AppendLine("\tPermanent write protect is enabled");
|
if(page.PRMWP) sb.AppendLine("\tPermanent write protect is enabled");
|
||||||
|
|
||||||
if(page.BAML)
|
if(page.BAML)
|
||||||
{
|
|
||||||
if(page.BAM) sb.AppendLine("\tDrive operates using explicit address mode");
|
if(page.BAM) sb.AppendLine("\tDrive operates using explicit address mode");
|
||||||
else sb.AppendLine("\tDrive operates using implicit address mode");
|
else sb.AppendLine("\tDrive operates using implicit address mode");
|
||||||
}
|
|
||||||
|
|
||||||
switch(page.RewindOnReset)
|
switch(page.RewindOnReset)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -247,16 +247,12 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendFormat("\tMedium has defined {0} partitions", page.PartitionSizes.Length).AppendLine();
|
sb.AppendFormat("\tMedium has defined {0} partitions", page.PartitionSizes.Length).AppendLine();
|
||||||
|
|
||||||
for(int i = 0; i < page.PartitionSizes.Length; i++)
|
for(int i = 0; i < page.PartitionSizes.Length; i++)
|
||||||
{
|
|
||||||
if(page.PartitionSizes[i] == 0)
|
if(page.PartitionSizes[i] == 0)
|
||||||
{
|
|
||||||
if(page.PartitionSizes.Length == 1)
|
if(page.PartitionSizes.Length == 1)
|
||||||
sb.AppendLine("\tDevice recognizes one single partition spanning whole medium");
|
sb.AppendLine("\tDevice recognizes one single partition spanning whole medium");
|
||||||
else sb.AppendFormat("\tPartition {0} runs for rest of medium", i).AppendLine();
|
else sb.AppendFormat("\tPartition {0} runs for rest of medium", i).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tPartition {0} is {1} {2} long", i, page.PartitionSizes[i], measure).AppendLine();
|
sb.AppendFormat("\tPartition {0} is {1} {2} long", i, page.PartitionSizes[i], measure).AppendLine();
|
||||||
}
|
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,10 +184,8 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(page.LogErr) sb.AppendLine("\tDrive shall log informational exception conditions");
|
if(page.LogErr) sb.AppendLine("\tDrive shall log informational exception conditions");
|
||||||
|
|
||||||
if(page.IntervalTimer > 0)
|
if(page.IntervalTimer > 0)
|
||||||
{
|
|
||||||
if(page.IntervalTimer == 0xFFFFFFFF) sb.AppendLine("\tTimer interval is vendor-specific");
|
if(page.IntervalTimer == 0xFFFFFFFF) sb.AppendLine("\tTimer interval is vendor-specific");
|
||||||
else sb.AppendFormat("\tTimer interval is {0} ms", page.IntervalTimer * 100).AppendLine();
|
else sb.AppendFormat("\tTimer interval is {0} ms", page.IntervalTimer * 100).AppendLine();
|
||||||
}
|
|
||||||
|
|
||||||
if(page.ReportCount > 0)
|
if(page.ReportCount > 0)
|
||||||
sb.AppendFormat("\tInformational exception conditions will be reported a maximum of {0} times",
|
sb.AppendFormat("\tInformational exception conditions will be reported a maximum of {0} times",
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(page.FirmwareTestControl == page.FirmwareTestControl2)
|
if(page.FirmwareTestControl == page.FirmwareTestControl2)
|
||||||
{
|
|
||||||
switch(page.FirmwareTestControl)
|
switch(page.FirmwareTestControl)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -124,7 +123,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendFormat("\tUnknown factory test code {0}", page.FirmwareTestControl).AppendLine();
|
sb.AppendFormat("\tUnknown factory test code {0}", page.FirmwareTestControl).AppendLine();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch(page.ExtendedPOSTMode)
|
switch(page.ExtendedPOSTMode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -377,22 +377,16 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(page.ReadCDRW)
|
if(page.ReadCDRW)
|
||||||
{
|
|
||||||
if(page.WriteCDRW) sb.AppendLine("\tDrive can read and write CD-RW");
|
if(page.WriteCDRW) sb.AppendLine("\tDrive can read and write CD-RW");
|
||||||
else sb.AppendLine("\tDrive can read CD-RW");
|
else sb.AppendLine("\tDrive can read CD-RW");
|
||||||
}
|
|
||||||
|
|
||||||
if(page.ReadDVDROM) sb.AppendLine("\tDrive can read DVD-ROM");
|
if(page.ReadDVDROM) sb.AppendLine("\tDrive can read DVD-ROM");
|
||||||
if(page.ReadDVDR)
|
if(page.ReadDVDR)
|
||||||
{
|
|
||||||
if(page.WriteDVDR) sb.AppendLine("\tDrive can read and write DVD-R");
|
if(page.WriteDVDR) sb.AppendLine("\tDrive can read and write DVD-R");
|
||||||
else sb.AppendLine("\tDrive can read DVD-R");
|
else sb.AppendLine("\tDrive can read DVD-R");
|
||||||
}
|
|
||||||
if(page.ReadDVDRAM)
|
if(page.ReadDVDRAM)
|
||||||
{
|
|
||||||
if(page.WriteDVDRAM) sb.AppendLine("\tDrive can read and write DVD-RAM");
|
if(page.WriteDVDRAM) sb.AppendLine("\tDrive can read and write DVD-RAM");
|
||||||
else sb.AppendLine("\tDrive can read DVD-RAM");
|
else sb.AppendLine("\tDrive can read DVD-RAM");
|
||||||
}
|
|
||||||
|
|
||||||
if(page.Composite) sb.AppendLine("\tDrive can deliver a composite audio and video data stream");
|
if(page.Composite) sb.AppendLine("\tDrive can deliver a composite audio and video data stream");
|
||||||
if(page.DigitalPort1) sb.AppendLine("\tDrive supports IEC-958 digital output on port 1");
|
if(page.DigitalPort1) sb.AppendLine("\tDrive supports IEC-958 digital output on port 1");
|
||||||
@@ -419,20 +413,14 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(page.WriteSpeedPerformanceDescriptors != null)
|
if(page.WriteSpeedPerformanceDescriptors != null)
|
||||||
{
|
|
||||||
foreach(ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors)
|
foreach(ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors)
|
||||||
{
|
|
||||||
if(descriptor.WriteSpeed > 0)
|
if(descriptor.WriteSpeed > 0)
|
||||||
{
|
|
||||||
if(descriptor.RotationControl == 0)
|
if(descriptor.RotationControl == 0)
|
||||||
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode",
|
sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode",
|
||||||
descriptor.WriteSpeed).AppendLine();
|
descriptor.WriteSpeed).AppendLine();
|
||||||
else if(descriptor.RotationControl == 1)
|
else if(descriptor.RotationControl == 1)
|
||||||
sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
||||||
descriptor.WriteSpeed).AppendLine();
|
descriptor.WriteSpeed).AppendLine();
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(page.TestWrite) sb.AppendLine("\tDrive supports test writing");
|
if(page.TestWrite) sb.AppendLine("\tDrive supports test writing");
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(header.Value.DPOFUA) sb.AppendLine("\tDrive supports DPO and FUA bits");
|
if(header.Value.DPOFUA) sb.AppendLine("\tDrive supports DPO and FUA bits");
|
||||||
|
|
||||||
if(header.Value.BlockDescriptors != null)
|
if(header.Value.BlockDescriptors != null)
|
||||||
{
|
|
||||||
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
||||||
{
|
{
|
||||||
string density = "";
|
string density = "";
|
||||||
@@ -138,25 +137,20 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(density != "")
|
if(density != "")
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks have {0} and are {1} bytes each", density,
|
sb.AppendFormat("\tAll remaining blocks have {0} and are {1} bytes each", density,
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
|
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
|
||||||
density, descriptor.BlockLength).AppendLine();
|
density, descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -373,7 +367,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendFormat("\tMedium is {0}", medium).AppendLine();
|
sb.AppendFormat("\tMedium is {0}", medium).AppendLine();
|
||||||
|
|
||||||
if(header.Value.BlockDescriptors != null)
|
if(header.Value.BlockDescriptors != null)
|
||||||
{
|
|
||||||
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
||||||
{
|
{
|
||||||
string density = "";
|
string density = "";
|
||||||
@@ -1463,9 +1456,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(density != "")
|
if(density != "")
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb
|
sb
|
||||||
.AppendFormat("\tAll remaining blocks conform to {0} and have a variable length",
|
.AppendFormat("\tAll remaining blocks conform to {0} and have a variable length",
|
||||||
@@ -1473,9 +1464,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
else
|
else
|
||||||
sb.AppendFormat("\tAll remaining blocks conform to {0} and are {1} bytes each",
|
sb.AppendFormat("\tAll remaining blocks conform to {0} and are {1} bytes each",
|
||||||
density, descriptor.BlockLength).AppendLine();
|
density, descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\t{0} blocks conform to {1} and have a variable length",
|
sb.AppendFormat("\t{0} blocks conform to {1} and have a variable length",
|
||||||
descriptor.Blocks, density).AppendLine();
|
descriptor.Blocks, density).AppendLine();
|
||||||
@@ -1483,30 +1472,21 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each",
|
sb.AppendFormat("\t{0} blocks conform to {1} and are {2} bytes each",
|
||||||
descriptor.Blocks, density, descriptor.BlockLength)
|
descriptor.Blocks, density, descriptor.BlockLength)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
|
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
|
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
|
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1575,7 +1555,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(header.Value.DPOFUA) sb.AppendLine("\tDrive supports DPO and FUA bits");
|
if(header.Value.DPOFUA) sb.AppendLine("\tDrive supports DPO and FUA bits");
|
||||||
|
|
||||||
if(header.Value.BlockDescriptors != null)
|
if(header.Value.BlockDescriptors != null)
|
||||||
{
|
|
||||||
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
||||||
{
|
{
|
||||||
string density = "";
|
string density = "";
|
||||||
@@ -1620,18 +1599,14 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(density != "")
|
if(density != "")
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks are {0} and have a variable length",
|
sb.AppendFormat("\tAll remaining blocks are {0} and have a variable length",
|
||||||
density).AppendLine();
|
density).AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tAll remaining blocks are {0} and are {1} bytes each",
|
sb.AppendFormat("\tAll remaining blocks are {0} and are {1} bytes each",
|
||||||
density, descriptor.BlockLength).AppendLine();
|
density, descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\t{0} blocks are {1} and have a variable length",
|
sb.AppendFormat("\t{0} blocks are {1} and have a variable length",
|
||||||
descriptor.Blocks, density).AppendLine();
|
descriptor.Blocks, density).AppendLine();
|
||||||
@@ -1639,30 +1614,21 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each",
|
sb.AppendFormat("\t{0} blocks are {1} and are {2} bytes each",
|
||||||
descriptor.Blocks, density, descriptor.BlockLength)
|
descriptor.Blocks, density, descriptor.BlockLength)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
|
sb.AppendFormat("\tAll remaining blocks have a variable length").AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
|
sb.AppendFormat("\tAll remaining blocks are {0} bytes each",
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.BlockLength == 0)
|
if(descriptor.BlockLength == 0)
|
||||||
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
|
sb.AppendFormat("\t{0} blocks have a variable length", descriptor.Blocks)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1793,7 +1759,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
if(header.Value.DPOFUA) sb.AppendLine("\tDrive supports DPO and FUA bits");
|
if(header.Value.DPOFUA) sb.AppendLine("\tDrive supports DPO and FUA bits");
|
||||||
|
|
||||||
if(header.Value.BlockDescriptors != null)
|
if(header.Value.BlockDescriptors != null)
|
||||||
{
|
|
||||||
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
foreach(BlockDescriptor descriptor in header.Value.BlockDescriptors)
|
||||||
{
|
{
|
||||||
string density = "";
|
string density = "";
|
||||||
@@ -1830,25 +1795,20 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(density != "")
|
if(density != "")
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks have {0} and are {1} bytes each", density,
|
sb.AppendFormat("\tAll remaining blocks have {0} and are {1} bytes each", density,
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
|
sb.AppendFormat("\t{0} blocks have {1} and are {2} bytes each", descriptor.Blocks,
|
||||||
density, descriptor.BlockLength).AppendLine();
|
density, descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(descriptor.Blocks == 0)
|
if(descriptor.Blocks == 0)
|
||||||
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
sb.AppendFormat("\tAll remaining blocks are {0} bytes each", descriptor.BlockLength)
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
else
|
else
|
||||||
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
sb.AppendFormat("\t{0} blocks are {1} bytes each", descriptor.Blocks,
|
||||||
descriptor.BlockLength).AppendLine();
|
descriptor.BlockLength).AppendLine();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
bool longLBA = (modeResponse[4] & 0x01) == 0x01;
|
bool longLBA = (modeResponse[4] & 0x01) == 0x01;
|
||||||
|
|
||||||
if(blockDescLength > 0)
|
if(blockDescLength > 0)
|
||||||
{
|
|
||||||
if(longLBA)
|
if(longLBA)
|
||||||
{
|
{
|
||||||
header.BlockDescriptors = new BlockDescriptor[blockDescLength / 16];
|
header.BlockDescriptors = new BlockDescriptor[blockDescLength / 16];
|
||||||
@@ -86,9 +85,7 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
{
|
{
|
||||||
header.BlockDescriptors[i] = new BlockDescriptor();
|
header.BlockDescriptors[i] = new BlockDescriptor();
|
||||||
if(deviceType != PeripheralDeviceTypes.DirectAccess)
|
if(deviceType != PeripheralDeviceTypes.DirectAccess)
|
||||||
{
|
|
||||||
header.BlockDescriptors[i].Density = (DensityType)modeResponse[0 + i * 8 + 8];
|
header.BlockDescriptors[i].Density = (DensityType)modeResponse[0 + i * 8 + 8];
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header.BlockDescriptors[i].Density = DensityType.Default;
|
header.BlockDescriptors[i].Density = DensityType.Default;
|
||||||
@@ -102,7 +99,6 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
header.BlockDescriptors[i].BlockLength += modeResponse[7 + i * 8 + 8];
|
header.BlockDescriptors[i].BlockLength += modeResponse[7 + i * 8 + 8];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(deviceType == PeripheralDeviceTypes.DirectAccess || deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
if(deviceType == PeripheralDeviceTypes.DirectAccess || deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user